Yw22 commited on
Commit
54e84e1
1 Parent(s): 135aa98
Files changed (1) hide show
  1. app.py +14 -8
app.py CHANGED
@@ -91,21 +91,26 @@ os.makedirs("models/personalized")
91
  os.makedirs("models/sd1-5")
92
 
93
  if not os.path.exists("models/flow_controlnet.ckpt"):
94
- os.system(f'wget https://huggingface.co/TencentARC/ImageConductor/resolve/main/flow_controlnet.ckpt?download=true -P models/')
95
  os.system(f'mv models/flow_controlnet.ckpt?download=true models/flow_controlnet.ckpt')
 
96
 
97
  if not os.path.exists("models/image_controlnet.ckpt"):
98
- os.system(f'wget https://huggingface.co/TencentARC/ImageConductor/resolve/main/image_controlnet.ckpt?download=true -P models/')
99
  os.system(f'mv models/image_controlnet.ckpt?download=true models/image_controlnet.ckpt')
100
-
101
 
102
  if not os.path.exists("models/unet.ckpt"):
103
- os.system(f'wget https://huggingface.co/TencentARC/ImageConductor/resolve/main/unet.ckpt?download=true -P models/')
104
  os.system(f'mv models/unet.ckpt?download=true models/unet.ckpt')
 
105
 
 
106
  if not os.path.exists("models/sd1-5/config.json"):
107
- os.system(f'wget https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/unet/config.json?download=true -P models/sd1-5/')
108
  os.system(f'mv models/sd1-5/config.json?download=true models/sd1-5/config.json')
 
 
109
 
110
  if not os.path.exists("models/sd1-5/unet.ckpt"):
111
  os.system(f'cp -r models/unet.ckpt models/sd1-5/unet.ckpt')
@@ -113,13 +118,15 @@ if not os.path.exists("models/sd1-5/unet.ckpt"):
113
  # os.system(f'wget https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/unet/diffusion_pytorch_model.bin?download=true -P models/sd1-5/')
114
 
115
  if not os.path.exists("models/personalized/helloobjects_V12c.safetensors"):
116
- os.system(f'wget https://huggingface.co/TencentARC/ImageConductor/resolve/main/helloobjects_V12c.safetensors?download=true -P models/personalized')
117
  os.system(f'mv models/personalized/helloobjects_V12c.safetensors?download=true models/personalized/helloobjects_V12c.safetensors')
 
118
 
119
 
120
  if not os.path.exists("models/personalized/TUSUN.safetensors"):
121
- os.system(f'wget https://huggingface.co/TencentARC/ImageConductor/resolve/main/TUSUN.safetensors?download=true -P models/personalized')
122
  os.system(f'mv models/personalized/TUSUN.safetensors?download=true models/personalized/TUSUN.safetensors')
 
123
 
124
 
125
 
@@ -615,7 +622,6 @@ if __name__=="__main__":
615
  fn=process_example,
616
  run_on_click=True,
617
  examples_per_page=10,
618
- cache_examples=False,
619
  )
620
 
621
 
 
91
  os.makedirs("models/sd1-5")
92
 
93
  if not os.path.exists("models/flow_controlnet.ckpt"):
94
+ os.system(f'wget -q https://huggingface.co/TencentARC/ImageConductor/resolve/main/flow_controlnet.ckpt?download=true -P models/')
95
  os.system(f'mv models/flow_controlnet.ckpt?download=true models/flow_controlnet.ckpt')
96
+ print("flow_controlnet Download!", )
97
 
98
  if not os.path.exists("models/image_controlnet.ckpt"):
99
+ os.system(f'wget -q https://huggingface.co/TencentARC/ImageConductor/resolve/main/image_controlnet.ckpt?download=true -P models/')
100
  os.system(f'mv models/image_controlnet.ckpt?download=true models/image_controlnet.ckpt')
101
+ print("image_controlnet Download!", )
102
 
103
  if not os.path.exists("models/unet.ckpt"):
104
+ os.system(f'wget -q https://huggingface.co/TencentARC/ImageConductor/resolve/main/unet.ckpt?download=true -P models/')
105
  os.system(f'mv models/unet.ckpt?download=true models/unet.ckpt')
106
+ print("unet Download!", )
107
 
108
+
109
  if not os.path.exists("models/sd1-5/config.json"):
110
+ os.system(f'wget -q https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/unet/config.json?download=true -P models/sd1-5/')
111
  os.system(f'mv models/sd1-5/config.json?download=true models/sd1-5/config.json')
112
+ print("config Download!", )
113
+
114
 
115
  if not os.path.exists("models/sd1-5/unet.ckpt"):
116
  os.system(f'cp -r models/unet.ckpt models/sd1-5/unet.ckpt')
 
118
  # os.system(f'wget https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/unet/diffusion_pytorch_model.bin?download=true -P models/sd1-5/')
119
 
120
  if not os.path.exists("models/personalized/helloobjects_V12c.safetensors"):
121
+ os.system(f'wget -q https://huggingface.co/TencentARC/ImageConductor/resolve/main/helloobjects_V12c.safetensors?download=true -P models/personalized')
122
  os.system(f'mv models/personalized/helloobjects_V12c.safetensors?download=true models/personalized/helloobjects_V12c.safetensors')
123
+ print("helloobjects_V12c Download!", )
124
 
125
 
126
  if not os.path.exists("models/personalized/TUSUN.safetensors"):
127
+ os.system(f'wget -q https://huggingface.co/TencentARC/ImageConductor/resolve/main/TUSUN.safetensors?download=true -P models/personalized')
128
  os.system(f'mv models/personalized/TUSUN.safetensors?download=true models/personalized/TUSUN.safetensors')
129
+ print("TUSUN Download!", )
130
 
131
 
132
 
 
622
  fn=process_example,
623
  run_on_click=True,
624
  examples_per_page=10,
 
625
  )
626
 
627