Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -165,7 +165,7 @@ def update_dimensions_from_image(image_list):
|
|
| 165 |
def get_duration(prompt_embeds, image_list, width, height, num_inference_steps, guidance_scale, seed, progress=gr.Progress(track_tqdm=True)):
|
| 166 |
num_images = 0 if image_list is None else len(image_list)
|
| 167 |
step_duration = 1 + 0.8 * num_images
|
| 168 |
-
return max(
|
| 169 |
|
| 170 |
@spaces.GPU(duration=get_duration)
|
| 171 |
def generate_image(prompt_embeds, image_list, width, height, num_inference_steps, guidance_scale, seed, progress=gr.Progress(track_tqdm=True)):
|
|
|
|
| 165 |
def get_duration(prompt_embeds, image_list, width, height, num_inference_steps, guidance_scale, seed, progress=gr.Progress(track_tqdm=True)):
|
| 166 |
num_images = 0 if image_list is None else len(image_list)
|
| 167 |
step_duration = 1 + 0.8 * num_images
|
| 168 |
+
return max(40, num_inference_steps * step_duration + 10)
|
| 169 |
|
| 170 |
@spaces.GPU(duration=get_duration)
|
| 171 |
def generate_image(prompt_embeds, image_list, width, height, num_inference_steps, guidance_scale, seed, progress=gr.Progress(track_tqdm=True)):
|