JOY-Huang commited on
Commit
102bf04
1 Parent(s): fbecea1
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -24,9 +24,12 @@ from pipelines.sdxl_instantir import InstantIRPipeline, LCM_LORA_MODULES, PREVIE
24
 
25
  from huggingface_hub import hf_hub_download
26
 
27
- hf_hub_download(repo_id="InstantX/InstantIR", filename="adapter.pt", local_dir="./checkpoints")
28
- hf_hub_download(repo_id="InstantX/InstantIR", filename="aggregator.pt", local_dir="./checkpoints")
29
- hf_hub_download(repo_id="InstantX/InstantIR", filename="previewer_lora_weights.bin", local_dir="./checkpoints")
 
 
 
30
 
31
 
32
  transform = transforms.Compose([
 
24
 
25
  from huggingface_hub import hf_hub_download
26
 
27
+ if not os.path.exists("checkpoints/adapter.pt"):
28
+ hf_hub_download(repo_id="InstantX/InstantIR", filename="adapter.pt", local_dir="./checkpoints")
29
+ if not os.path.exists("checkpoints/aggregator.pt"):
30
+ hf_hub_download(repo_id="InstantX/InstantIR", filename="aggregator.pt", local_dir="./checkpoints")
31
+ if not os.path.exists("checkpoints/previewer_lora_weights.bin"):
32
+ hf_hub_download(repo_id="InstantX/InstantIR", filename="previewer_lora_weights.bin", local_dir="./checkpoints")
33
 
34
 
35
  transform = transforms.Compose([