xichenhku commited on
Commit
8459bc2
1 Parent(s): 46e3758

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -24,12 +24,17 @@ from modelscope.hub.snapshot_download import snapshot_download as ms_snapshot_do
24
  import spaces
25
 
26
 
27
-
28
- sd_dir = ms_snapshot_download('xichen/cleansd', cache_dir='./modelscope')
29
  print('=== Pretrained SD weights downloaded ===')
30
- model_dir = ms_snapshot_download('xichen/MimicBrush', cache_dir='./modelscope')
31
  print('=== MimicBrush weights downloaded ===')
32
 
 
 
 
 
 
33
  val_configs = OmegaConf.load('./configs/inference.yaml')
34
 
35
  # === import Depth Anything ===
@@ -309,7 +314,7 @@ with gr.Blocks() as demo:
309
  with gr.Row():
310
  base = gr.ImageEditor( label="Source",
311
  type="pil",
312
- brush=gr.Brush(colors=["#000000"],default_size = 50,color_mode = "fixed"),
313
  layers = False,
314
  interactive=True
315
  )
 
24
  import spaces
25
 
26
 
27
+ from huggingface_hub import snapshot_download
28
+ snapshot_download(repo_id="xichenhku/cleansd", local_dir="./cleansd")
29
  print('=== Pretrained SD weights downloaded ===')
30
+ snapshot_download(repo_id="xichenhku/MimicBrush", local_dir="./MimicBrush")
31
  print('=== MimicBrush weights downloaded ===')
32
 
33
+ #sd_dir = ms_snapshot_download('xichen/cleansd', cache_dir='./modelscope')
34
+ #print('=== Pretrained SD weights downloaded ===')
35
+ #model_dir = ms_snapshot_download('xichen/MimicBrush', cache_dir='./modelscope')
36
+ #print('=== MimicBrush weights downloaded ===')
37
+
38
  val_configs = OmegaConf.load('./configs/inference.yaml')
39
 
40
  # === import Depth Anything ===
 
314
  with gr.Row():
315
  base = gr.ImageEditor( label="Source",
316
  type="pil",
317
+ brush=gr.Brush(colors=["#000000"],default_size = 30,color_mode = "fixed"),
318
  layers = False,
319
  interactive=True
320
  )