wondervictor commited on
Commit
0e6546e
·
verified ·
1 Parent(s): 1ddf4f5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -32,6 +32,7 @@ print("Torch version:", torch.__version__)
32
  # # hf_hub_download('google/flan-t5-xl', cache_dir='./checkpoints/')
33
  ckpt_folder = './checkpoints'
34
  t5_folder = os.path.join(ckpt_folder, "flan-t5-xl/flan-t5-xl")
 
35
  hf_hub_download(repo_id="google/flan-t5-xl", filename="config.json", local_dir=t5_folder)
36
  hf_hub_download(repo_id="google/flan-t5-xl", filename="pytorch_model-00001-of-00002.bin", local_dir=t5_folder)
37
  hf_hub_download(repo_id="google/flan-t5-xl", filename="pytorch_model-00002-of-00002.bin", local_dir=t5_folder)
@@ -45,6 +46,10 @@ hf_hub_download(repo_id="lllyasviel/Annotators", filename="dpt_hybrid-midas-501f
45
  hf_hub_download(repo_id="wondervictor/ControlAR", filename="canny_MR.safetensors", local_dir=ckpt_folder)
46
  hf_hub_download(repo_id="wondervictor/ControlAR", filename="depth_MR.safetensors", local_dir=ckpt_folder)
47
 
 
 
 
 
48
 
49
  DESCRIPTION = "# [ControlAR: Controllable Image Generation with Autoregressive Models](https://arxiv.org/abs/2410.02705) \n ### The first row in outputs is the input image and condition. The second row is the images generated by ControlAR. \n ### You can run locally by following the instruction on our [Github Repo](https://github.com/hustvl/ControlAR)."
50
  SHOW_DUPLICATE_BUTTON = os.getenv("SHOW_DUPLICATE_BUTTON") == "1"
 
32
  # # hf_hub_download('google/flan-t5-xl', cache_dir='./checkpoints/')
33
  ckpt_folder = './checkpoints'
34
  t5_folder = os.path.join(ckpt_folder, "flan-t5-xl/flan-t5-xl")
35
+ dinov2_folder = os.path.join(ckpt_folder, "dinov2-small")
36
  hf_hub_download(repo_id="google/flan-t5-xl", filename="config.json", local_dir=t5_folder)
37
  hf_hub_download(repo_id="google/flan-t5-xl", filename="pytorch_model-00001-of-00002.bin", local_dir=t5_folder)
38
  hf_hub_download(repo_id="google/flan-t5-xl", filename="pytorch_model-00002-of-00002.bin", local_dir=t5_folder)
 
46
  hf_hub_download(repo_id="wondervictor/ControlAR", filename="canny_MR.safetensors", local_dir=ckpt_folder)
47
  hf_hub_download(repo_id="wondervictor/ControlAR", filename="depth_MR.safetensors", local_dir=ckpt_folder)
48
 
49
+ hf_hub_download(repo_id="facebook/dinov2-small", filename="config.json", local_dir=dinov2_folder)
50
+ hf_hub_download(repo_id="facebook/dinov2-small", filename="preprocessor_config.json", local_dir=dinov2_folder)
51
+ hf_hub_download(repo_id="facebook/dinov2-small", filename="pytorch_model.bin", local_dir=dinov2_folder)
52
+
53
 
54
  DESCRIPTION = "# [ControlAR: Controllable Image Generation with Autoregressive Models](https://arxiv.org/abs/2410.02705) \n ### The first row in outputs is the input image and condition. The second row is the images generated by ControlAR. \n ### You can run locally by following the instruction on our [Github Repo](https://github.com/hustvl/ControlAR)."
55
  SHOW_DUPLICATE_BUTTON = os.getenv("SHOW_DUPLICATE_BUTTON") == "1"