Spaces:
Running
on
Zero
Running
on
Zero
Bobby
commited on
Commit
·
7332b87
1
Parent(s):
58d6d79
profiler part 2
Browse files- profiler.py +3 -1
profiler.py
CHANGED
@@ -283,11 +283,13 @@ def main():
|
|
283 |
guidance_scale,
|
284 |
seed,
|
285 |
]
|
|
|
286 |
@spaces.GPU(duration=11)
|
287 |
@torch.inference_mode()
|
|
|
288 |
def auto_process_image(image, prompt, a_prompt, n_prompt, num_images, image_resolution, preprocess_resolution, num_steps, guidance_scale, seed):
|
289 |
return process_image(image, prompt, a_prompt, n_prompt, num_images, image_resolution, preprocess_resolution, num_steps, guidance_scale, seed)
|
290 |
-
|
291 |
@gr.on(triggers=[image.upload], inputs=None, outputs=[use_ai_button, run_button])
|
292 |
def turn_buttons_off():
|
293 |
return gr.update(visible=False), gr.update(visible=False)
|
|
|
283 |
guidance_scale,
|
284 |
seed,
|
285 |
]
|
286 |
+
|
287 |
@spaces.GPU(duration=11)
|
288 |
@torch.inference_mode()
|
289 |
+
@gr.on(triggers=[image.upload], inputs=config, outputs=[result])
|
290 |
def auto_process_image(image, prompt, a_prompt, n_prompt, num_images, image_resolution, preprocess_resolution, num_steps, guidance_scale, seed):
|
291 |
return process_image(image, prompt, a_prompt, n_prompt, num_images, image_resolution, preprocess_resolution, num_steps, guidance_scale, seed)
|
292 |
+
|
293 |
@gr.on(triggers=[image.upload], inputs=None, outputs=[use_ai_button, run_button])
|
294 |
def turn_buttons_off():
|
295 |
return gr.update(visible=False), gr.update(visible=False)
|