Yw22 commited on
Commit
68f3a90
1 Parent(s): 1c96b42
Files changed (1) hide show
  1. app.py +22 -13
app.py CHANGED
@@ -89,28 +89,37 @@ If you have any questions, please feel free to reach me out at <b>ywl@stu.pku.ed
89
 
90
  os.makedirs("models/personalized")
91
  os.makedirs("models/sd1-5")
92
- os.system(f'wget https://huggingface.co/TencentARC/ImageConductor/resolve/main/flow_controlnet.ckpt?download=true -P models/')
93
- os.system(f'mv models/flow_controlnet.ckpt?download=true models/flow_controlnet.ckpt')
94
 
95
- os.system(f'wget https://huggingface.co/TencentARC/ImageConductor/resolve/main/image_controlnet.ckpt?download=true -P models/')
96
- os.system(f'mv models/image_controlnet.ckpt?download=true models/image_controlnet.ckpt')
 
97
 
98
- os.system(f'wget https://huggingface.co/TencentARC/ImageConductor/resolve/main/unet.ckpt?download=true -P models/')
99
- os.system(f'mv models/unet.ckpt?download=true models/unet.ckpt')
 
100
 
101
 
102
- os.system(f'wget https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/unet/config.json?download=true -P models/sd1-5/')
103
- os.system(f'mv models/sd1-5/config.json?download=true models/sd1-5/config.json')
 
104
 
105
- os.system(f'cp -r models/unet.ckpt models/sd1-5/unet.ckpt')
 
 
 
 
 
106
 
107
  # 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/')
108
 
109
- os.system(f'wget https://huggingface.co/TencentARC/ImageConductor/resolve/main/helloobjects_V12c.safetensors?download=true -P models/personalized')
110
- os.system(f'mv models/personalized/helloobjects_V12c.safetensors?download=true models/personalized/helloobjects_V12c.safetensors')
 
 
111
 
112
- os.system(f'wget https://huggingface.co/TencentARC/ImageConductor/resolve/main/TUSUN.safetensors?download=true -P models/personalized')
113
- os.system(f'mv models/personalized/TUSUN.safetensors?download=true models/personalized/TUSUN.safetensors')
 
114
 
115
 
116
 
 
89
 
90
  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')
112
 
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