Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -162,14 +162,9 @@ def update_dimensions_from_image(image_list):
|
|
| 162 |
|
| 163 |
return new_width, new_height
|
| 164 |
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
if use_turbo:
|
| 169 |
-
return max(30, 8 * step_duration + 10)
|
| 170 |
-
return max(65, num_inference_steps * step_duration + 10)
|
| 171 |
-
|
| 172 |
-
@spaces.GPU(duration=get_duration)
|
| 173 |
def generate_image(prompt_embeds, image_list, width, height, num_inference_steps, guidance_scale, seed, use_turbo, progress=gr.Progress(track_tqdm=True)):
|
| 174 |
prompt_embeds = prompt_embeds.to(device)
|
| 175 |
|
|
|
|
| 162 |
|
| 163 |
return new_width, new_height
|
| 164 |
|
| 165 |
+
# ⚠️ spaces.GPU duration은 정수(초)만 가능, 함수는 지원 안됨
|
| 166 |
+
# Turbo 모드: ~30초, Standard 모드: ~65초 → 안전하게 120초 설정
|
| 167 |
+
@spaces.GPU(duration=120)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 168 |
def generate_image(prompt_embeds, image_list, width, height, num_inference_steps, guidance_scale, seed, use_turbo, progress=gr.Progress(track_tqdm=True)):
|
| 169 |
prompt_embeds = prompt_embeds.to(device)
|
| 170 |
|