Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -182,18 +182,15 @@ def infer(image, width, height, overlap_percentage, num_inference_steps, resize_
|
|
182 |
cnet_image.paste(0, (0, 0), mask)
|
183 |
|
184 |
final_prompt = f"{prompt_input} , high quality, 4k"
|
185 |
-
negative_final_prompt = f"{negative_prompt_input}"
|
186 |
|
187 |
(
|
188 |
prompt_embeds,
|
|
|
189 |
pooled_prompt_embeds,
|
|
|
190 |
) = pipe.encode_prompt(final_prompt, "cuda", True)
|
191 |
|
192 |
-
|
193 |
-
negative_prompt_embeds,
|
194 |
-
negative_pooled_prompt_embeds,
|
195 |
-
) = pipe.encode_prompt(negative_final_prompt, "cuda", True)
|
196 |
-
|
197 |
for image in pipe(
|
198 |
prompt_embeds=prompt_embeds,
|
199 |
negative_prompt_embeds=negative_prompt_embeds,
|
@@ -274,8 +271,6 @@ with gr.Blocks(css=css) as demo:
|
|
274 |
with gr.Row():
|
275 |
with gr.Column(scale=2):
|
276 |
prompt_input = gr.Textbox(label="Prompt (Optional)")
|
277 |
-
with gr.Column(scale=2):
|
278 |
-
negative_prompt_input = gr.Textbox(label="Negative Prompt (Optional)")
|
279 |
with gr.Column(scale=1):
|
280 |
run_button = gr.Button("Generate")
|
281 |
|
|
|
182 |
cnet_image.paste(0, (0, 0), mask)
|
183 |
|
184 |
final_prompt = f"{prompt_input} , high quality, 4k"
|
|
|
185 |
|
186 |
(
|
187 |
prompt_embeds,
|
188 |
+
negative_prompt_embeds,
|
189 |
pooled_prompt_embeds,
|
190 |
+
negative_pooled_prompt_embeds,
|
191 |
) = pipe.encode_prompt(final_prompt, "cuda", True)
|
192 |
|
193 |
+
|
|
|
|
|
|
|
|
|
194 |
for image in pipe(
|
195 |
prompt_embeds=prompt_embeds,
|
196 |
negative_prompt_embeds=negative_prompt_embeds,
|
|
|
271 |
with gr.Row():
|
272 |
with gr.Column(scale=2):
|
273 |
prompt_input = gr.Textbox(label="Prompt (Optional)")
|
|
|
|
|
274 |
with gr.Column(scale=1):
|
275 |
run_button = gr.Button("Generate")
|
276 |
|