Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -170,7 +170,6 @@ def infer(
|
|
| 170 |
aspect_ratio="1:1",
|
| 171 |
guidance_scale=1.0,
|
| 172 |
num_inference_steps=8,
|
| 173 |
-
prompt_enhance=True,
|
| 174 |
progress=gr.Progress(track_tqdm=True),
|
| 175 |
):
|
| 176 |
"""
|
|
@@ -185,7 +184,7 @@ def infer(
|
|
| 185 |
encourages the model to generate images that are more closely related
|
| 186 |
to the prompt.
|
| 187 |
num_inference_steps (int): The number of denoising steps.
|
| 188 |
-
|
| 189 |
LLM to add more detail.
|
| 190 |
progress (gr.Progress): A Gradio Progress object to track the generation
|
| 191 |
progress in the UI.
|
|
@@ -207,8 +206,7 @@ def infer(
|
|
| 207 |
generator = torch.Generator(device="cuda").manual_seed(seed)
|
| 208 |
|
| 209 |
print(f"Calling pipeline with prompt: '{prompt}'")
|
| 210 |
-
|
| 211 |
-
prompt = rewrite(prompt)
|
| 212 |
|
| 213 |
print(f"Actual Prompt: '{prompt}'")
|
| 214 |
print(f"Negative Prompt: '{negative_prompt}'")
|
|
@@ -290,7 +288,6 @@ with gr.Blocks(css=css) as demo:
|
|
| 290 |
choices=["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3"],
|
| 291 |
value="16:9",
|
| 292 |
)
|
| 293 |
-
prompt_enhance = gr.Checkbox(label="Prompt Enhance", value=True)
|
| 294 |
|
| 295 |
with gr.Row():
|
| 296 |
guidance_scale = gr.Slider(
|
|
@@ -321,7 +318,6 @@ with gr.Blocks(css=css) as demo:
|
|
| 321 |
aspect_ratio,
|
| 322 |
guidance_scale,
|
| 323 |
num_inference_steps,
|
| 324 |
-
prompt_enhance,
|
| 325 |
],
|
| 326 |
outputs=[result, seed],
|
| 327 |
)
|
|
|
|
| 170 |
aspect_ratio="1:1",
|
| 171 |
guidance_scale=1.0,
|
| 172 |
num_inference_steps=8,
|
|
|
|
| 173 |
progress=gr.Progress(track_tqdm=True),
|
| 174 |
):
|
| 175 |
"""
|
|
|
|
| 184 |
encourages the model to generate images that are more closely related
|
| 185 |
to the prompt.
|
| 186 |
num_inference_steps (int): The number of denoising steps.
|
| 187 |
+
|
| 188 |
LLM to add more detail.
|
| 189 |
progress (gr.Progress): A Gradio Progress object to track the generation
|
| 190 |
progress in the UI.
|
|
|
|
| 206 |
generator = torch.Generator(device="cuda").manual_seed(seed)
|
| 207 |
|
| 208 |
print(f"Calling pipeline with prompt: '{prompt}'")
|
| 209 |
+
|
|
|
|
| 210 |
|
| 211 |
print(f"Actual Prompt: '{prompt}'")
|
| 212 |
print(f"Negative Prompt: '{negative_prompt}'")
|
|
|
|
| 288 |
choices=["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3"],
|
| 289 |
value="16:9",
|
| 290 |
)
|
|
|
|
| 291 |
|
| 292 |
with gr.Row():
|
| 293 |
guidance_scale = gr.Slider(
|
|
|
|
| 318 |
aspect_ratio,
|
| 319 |
guidance_scale,
|
| 320 |
num_inference_steps,
|
|
|
|
| 321 |
],
|
| 322 |
outputs=[result, seed],
|
| 323 |
)
|