Spaces:
Running
Running
Update gradio_demo/app.py
Browse files- 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
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"
|