Update app.py
Browse files
app.py
CHANGED
|
@@ -141,6 +141,7 @@ def infer(
|
|
| 141 |
guidance_scale,
|
| 142 |
num_inference_steps,
|
| 143 |
expanded,
|
|
|
|
| 144 |
latent_file, # Add latents file input
|
| 145 |
progress=gr.Progress(track_tqdm=True),
|
| 146 |
):
|
|
@@ -199,7 +200,7 @@ def infer(
|
|
| 199 |
print('-- filtered prompt 2 --')
|
| 200 |
print(enhanced_prompt_2)
|
| 201 |
if expanded_only:
|
| 202 |
-
return
|
| 203 |
else:
|
| 204 |
enhanced_prompt = prompt
|
| 205 |
enhanced_prompt_2 = prompt
|
|
@@ -426,6 +427,7 @@ with gr.Blocks(theme=gr.themes.Origin(),css=css) as demo:
|
|
| 426 |
guidance_scale,
|
| 427 |
num_inference_steps,
|
| 428 |
expanded,
|
|
|
|
| 429 |
latent_file, # Add latent_file to the inputs
|
| 430 |
],
|
| 431 |
outputs=[result, seed, expanded_prompt_output],
|
|
|
|
| 141 |
guidance_scale,
|
| 142 |
num_inference_steps,
|
| 143 |
expanded,
|
| 144 |
+
expanded_only,
|
| 145 |
latent_file, # Add latents file input
|
| 146 |
progress=gr.Progress(track_tqdm=True),
|
| 147 |
):
|
|
|
|
| 200 |
print('-- filtered prompt 2 --')
|
| 201 |
print(enhanced_prompt_2)
|
| 202 |
if expanded_only:
|
| 203 |
+
return None, seed, enhanced_prompt
|
| 204 |
else:
|
| 205 |
enhanced_prompt = prompt
|
| 206 |
enhanced_prompt_2 = prompt
|
|
|
|
| 427 |
guidance_scale,
|
| 428 |
num_inference_steps,
|
| 429 |
expanded,
|
| 430 |
+
expanded_only,
|
| 431 |
latent_file, # Add latent_file to the inputs
|
| 432 |
],
|
| 433 |
outputs=[result, seed, expanded_prompt_output],
|