Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -70,7 +70,7 @@ def load_lora_auto(pipe, lora_input):
|
|
| 70 |
finally:
|
| 71 |
shutil.rmtree(tmp_dir, ignore_errors=True)
|
| 72 |
|
| 73 |
-
@spaces.GPU(duration=
|
| 74 |
def infer(prompt, seed=42, randomize_seed=False, width=1024, height=1024, guidance_scale=3.5, num_inference_steps=28, lora_id=None, lora_scale=0.95, progress=gr.Progress(track_tqdm=True)):
|
| 75 |
if randomize_seed:
|
| 76 |
seed = random.randint(0, MAX_SEED)
|
|
@@ -196,4 +196,4 @@ with gr.Blocks(css=css) as app:
|
|
| 196 |
# text_button.click(query, inputs=[custom_lora, text_prompt, steps, cfg, randomize_seed, seed, width, height], outputs=[image_output,seed_output, seed])
|
| 197 |
# text_button.click(infer, inputs=[text_prompt, seed, randomize_seed, width, height, cfg, steps, custom_lora, lora_scale], outputs=[image_output,seed_output, seed])
|
| 198 |
|
| 199 |
-
app.launch(share=True)
|
|
|
|
| 70 |
finally:
|
| 71 |
shutil.rmtree(tmp_dir, ignore_errors=True)
|
| 72 |
|
| 73 |
+
@spaces.GPU(duration=30)
|
| 74 |
def infer(prompt, seed=42, randomize_seed=False, width=1024, height=1024, guidance_scale=3.5, num_inference_steps=28, lora_id=None, lora_scale=0.95, progress=gr.Progress(track_tqdm=True)):
|
| 75 |
if randomize_seed:
|
| 76 |
seed = random.randint(0, MAX_SEED)
|
|
|
|
| 196 |
# text_button.click(query, inputs=[custom_lora, text_prompt, steps, cfg, randomize_seed, seed, width, height], outputs=[image_output,seed_output, seed])
|
| 197 |
# text_button.click(infer, inputs=[text_prompt, seed, randomize_seed, width, height, cfg, steps, custom_lora, lora_scale], outputs=[image_output,seed_output, seed])
|
| 198 |
|
| 199 |
+
app.launch(mcp_server=True, share=True)
|