Dreamspire commited on
Commit
0013162
·
1 Parent(s): f2dbf59

update app

Browse files
Files changed (1) hide show
  1. app.py +43 -0
app.py CHANGED
@@ -5,6 +5,49 @@ from typing import Sequence, Mapping, Any, Union
5
  import torch
6
  import gradio as gr
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
  def get_value_at_index(obj: Union[Sequence, Mapping], index: int) -> Any:
10
  """Returns the value at the given index of a sequence or mapping.
 
5
  import torch
6
  import gradio as gr
7
 
8
+ from huggingface_hub import hf_hub_download
9
+ from huggingface_hub import snapshot_download
10
+ #hf_hub_download(repo_id="black-forest-labs/FLUX.1-Redux-dev", filename="flux1-redux-dev.safetensors", local_dir="models/style_models")
11
+
12
+ #https://huggingface.co/autismanon/modeldump/blob/main/dreamshaper_8.safetensors
13
+ print("dreamshaper_8.safetensors")
14
+ hf_hub_download(repo_id="autismanon/modeldump", filename="dreamshaper_8.safetensors", local_dir="models/checkpoints/SD1.5/")
15
+
16
+ #https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/control_v11p_sd15_openpose.pth
17
+ print("control_v11p_sd15_openpose.pth")
18
+ hf_hub_download(repo_id="lllyasviel/ControlNet-v1-1", filename="control_v11p_sd15_openpose.pth", local_dir="models/controlnet/SD1.5/")
19
+
20
+ #https://huggingface.co/microsoft/Florence-2-base
21
+ print("microsoft/Florence-2-base")
22
+ snapshot_download(repo_id="microsoft/Florence-2-base", local_dir="models/LLM/")
23
+
24
+ #https://huggingface.co/ahtoshkaa/Dreamshaper/blob/d4415d1a2644f08ab34bd7adabfbbb70571a782a/dreamshaper_8Inpainting.safetensors
25
+ print("dreamshaper_8Inpainting.safetensors")
26
+ hf_hub_download(repo_id="ahtoshkaa/Dreamshaper", filename="dreamshaper_8Inpainting.safetensors", local_dir="models/checkpoints/SD1.5/")
27
+
28
+ #https://huggingface.co/naonovn/Lora/blob/main/add_detail.safetensors
29
+ print("add_detail.safetensors")
30
+ hf_hub_download(repo_id="naonovn/Lora", filename="add_detail.safetensors", local_dir="models/loras/")
31
+
32
+ #https://huggingface.co/Dreamspire/BaldifierW2/blob/main/BaldifierW2.safetensors
33
+ print("BaldifierW2.safetensors")
34
+ hf_hub_download(repo_id="Dreamspire/BaldifierW2", filename="BaldifierW2.safetensors", local_dir="models/loras/")
35
+
36
+ #https://huggingface.co/lokCX/4x-Ultrasharp/blob/main/4x-UltraSharp.pth
37
+ print("UltraSharp.pth")
38
+ hf_hub_download(repo_id="lokCX/4x-Ultrasharp", filename="4x-UltraSharp.pth", local_dir="models/upscale_models/")
39
+
40
+
41
+ #./clip_vision/CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors
42
+ #./insightface/models/buffalo_l/w600k_r50.onnx
43
+ #./insightface/models/buffalo_l/det_10g.onnx
44
+ #./insightface/models/buffalo_l/2d106det.onnx
45
+ #./insightface/models/buffalo_l/1k3d68.onnx
46
+ #./insightface/models/buffalo_l/genderage.onnx
47
+ #./ipadapter/ip-adapter_sd15_light_v11.bin
48
+ #./ipadapter/ip-adapter_sd15.safetensors
49
+ #./ipadapter/ip-adapter-plus-face_sd15.safetensors
50
+ #./annotator/yzd-v/DWPose/yolox_l.onnx
51
 
52
  def get_value_at_index(obj: Union[Sequence, Mapping], index: int) -> Any:
53
  """Returns the value at the given index of a sequence or mapping.