Spaces:
Running
on
Zero
Running
on
Zero
Update app_v3.py
Browse files
app_v3.py
CHANGED
@@ -66,7 +66,7 @@ except Exception as e:
|
|
66 |
# even with ample VRAM, as it can sometimes help with very large tensors.
|
67 |
pipe.enable_attention_slicing()
|
68 |
|
69 |
-
@spaces.GPU(duration=
|
70 |
@torch.no_grad()
|
71 |
def generate_image(prompt, scale, steps, control_image, controlnet_conditioning_scale, guidance_scale, seed, guidance_end):
|
72 |
generator = torch.Generator().manual_seed(seed)
|
@@ -153,6 +153,7 @@ def process_image(control_image, user_prompt, system_prompt, scale, steps,
|
|
153 |
seed=seed,
|
154 |
guidance_end=guidance_end
|
155 |
)
|
|
|
156 |
log_params(final_prompt, scale, steps, controlnet_conditioning_scale, guidance_scale, seed, guidance_end, control_image, image)
|
157 |
yield f"Completed! Used prompt: {final_prompt}", image, final_prompt
|
158 |
except Exception as e:
|
|
|
66 |
# even with ample VRAM, as it can sometimes help with very large tensors.
|
67 |
pipe.enable_attention_slicing()
|
68 |
|
69 |
+
@spaces.GPU(duration=12)
|
70 |
@torch.no_grad()
|
71 |
def generate_image(prompt, scale, steps, control_image, controlnet_conditioning_scale, guidance_scale, seed, guidance_end):
|
72 |
generator = torch.Generator().manual_seed(seed)
|
|
|
153 |
seed=seed,
|
154 |
guidance_end=guidance_end
|
155 |
)
|
156 |
+
image.save("/tmp/" + str(seed) + "output.png")
|
157 |
log_params(final_prompt, scale, steps, controlnet_conditioning_scale, guidance_scale, seed, guidance_end, control_image, image)
|
158 |
yield f"Completed! Used prompt: {final_prompt}", image, final_prompt
|
159 |
except Exception as e:
|