刘虹雨 commited on
Commit
bbd0d54
·
1 Parent(s): 23af8a2

update code

Browse files
Files changed (1) hide show
  1. app.py +24 -4
app.py CHANGED
@@ -269,10 +269,30 @@ def prepare_working_dir(dir, style):
269
 
270
 
271
  def launch_pretrained():
272
- from huggingface_hub import hf_hub_download, snapshot_download
273
- hf_hub_download(repo_id="KumaPower/AvatarArtist", repo_type='model', local_dir="./pretrained_model")
274
- hf_hub_download(repo_id="stabilityai/stable-diffusion-2-1-base", repo_type='model', local_dir="./pretrained_model/sd21")
275
- hf_hub_download(repo_id="CrucibleAI/ControlNetMediaPipeFace", repo_type='model', local_dir="./pretrained_model/control")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
276
 
277
 
278
  def prepare_image_list(img_dir, selected_img):
 
269
 
270
 
271
  def launch_pretrained():
272
+
273
+ from huggingface_hub import snapshot_download
274
+
275
+ snapshot_download(
276
+ repo_id="KumaPower/AvatarArtist",
277
+ repo_type="model",
278
+ local_dir="./pretrained_model",
279
+ local_dir_use_symlinks=False
280
+ )
281
+
282
+ snapshot_download(
283
+ repo_id="stabilityai/stable-diffusion-2-1-base",
284
+ repo_type="model",
285
+ local_dir="./pretrained_model/sd21",
286
+ local_dir_use_symlinks=False
287
+ )
288
+
289
+ # 下载 CrucibleAI/ControlNetMediaPipeFace 的所有文件
290
+ snapshot_download(
291
+ repo_id="CrucibleAI/ControlNetMediaPipeFace",
292
+ repo_type="model",
293
+ local_dir="./pretrained_model/control",
294
+ local_dir_use_symlinks=False
295
+ )
296
 
297
 
298
  def prepare_image_list(img_dir, selected_img):