Spaces:
Running
on
Zero
Running
on
Zero
wanghaofan
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -14,6 +14,9 @@ from depth_anything_v2.dpt import DepthAnythingV2
|
|
14 |
|
15 |
from huggingface_hub import hf_hub_download
|
16 |
|
|
|
|
|
|
|
17 |
|
18 |
MAX_SEED = np.iinfo(np.int32).max
|
19 |
|
@@ -130,7 +133,7 @@ def resize_img(input_image, max_side=1024, min_side=768, size=None,
|
|
130 |
input_image = Image.fromarray(res)
|
131 |
return input_image
|
132 |
|
133 |
-
@spaces.GPU()
|
134 |
def infer(cond_in, image_in, prompt, inference_steps, guidance_scale, control_mode, control_strength, seed, progress=gr.Progress(track_tqdm=True)):
|
135 |
|
136 |
control_mode_num = mode_mapping[control_mode]
|
|
|
14 |
|
15 |
from huggingface_hub import hf_hub_download
|
16 |
|
17 |
+
from huggingface_hub import login
|
18 |
+
hf_token = os.environ.get("HF_TOKEN_GATED")
|
19 |
+
login(token=hf_token)
|
20 |
|
21 |
MAX_SEED = np.iinfo(np.int32).max
|
22 |
|
|
|
133 |
input_image = Image.fromarray(res)
|
134 |
return input_image
|
135 |
|
136 |
+
@spaces.GPU(duration=190)
|
137 |
def infer(cond_in, image_in, prompt, inference_steps, guidance_scale, control_mode, control_strength, seed, progress=gr.Progress(track_tqdm=True)):
|
138 |
|
139 |
control_mode_num = mode_mapping[control_mode]
|