fffiloni commited on
Commit
7295c51
1 Parent(s): 40ea8f0

Update gradio_demo/app.py

Browse files
Files changed (1) hide show
  1. gradio_demo/app.py +7 -1
gradio_demo/app.py CHANGED
@@ -36,7 +36,13 @@ def resize_img(input_image, max_side=1280, min_side=1024, size=None,
36
  input_image = Image.fromarray(res)
37
  return input_image
38
 
39
- instantir_path = os.environ['INSTANTIR_PATH']
 
 
 
 
 
 
40
 
41
  device = "cuda" if torch.cuda.is_available() else "cpu"
42
  sdxl_repo_id = "stabilityai/stable-diffusion-xl-base-1.0"
 
36
  input_image = Image.fromarray(res)
37
  return input_image
38
 
39
+ from huggingface_hub import hf_hub_download
40
+
41
+ hf_hub_download(repo_id="InstantX/InstantIR", filename="models/adapter.pt", local_dir=".")
42
+ hf_hub_download(repo_id="InstantX/InstantIR", filename="models/aggregator.pt", local_dir=".")
43
+ hf_hub_download(repo_id="InstantX/InstantIR", filename="models/previewer_lora_weights.bin", local_dir=".")
44
+
45
+ instantir_path = f'./models'
46
 
47
  device = "cuda" if torch.cuda.is_available() else "cpu"
48
  sdxl_repo_id = "stabilityai/stable-diffusion-xl-base-1.0"