Update app.py
Browse files
app.py
CHANGED
@@ -136,7 +136,7 @@ def generate_image_for_gradio(
|
|
136 |
|
137 |
print(f"Generating image for prompt: '{prompt}'")
|
138 |
|
139 |
-
|
140 |
control_image = depth_map_pil.convert("RGB")
|
141 |
control_image = control_image.resize((512, 512), Image.LANCZOS)
|
142 |
|
@@ -160,9 +160,11 @@ def generate_image_for_gradio(
|
|
160 |
with torch.no_grad():
|
161 |
generated_images = pipeline(
|
162 |
prompt,
|
|
|
163 |
image=input_image_for_pipeline,
|
164 |
-
num_inference_steps=
|
165 |
-
guidance_scale=
|
|
|
166 |
generator=generator,
|
167 |
).images
|
168 |
|
|
|
136 |
|
137 |
print(f"Generating image for prompt: '{prompt}'")
|
138 |
|
139 |
+
negative_prompt = "lowres, watermark, banner, logo, watermark, contactinfo, text, deformed, blurry, blur, out of focus, out of frame, surreal, ugly"
|
140 |
control_image = depth_map_pil.convert("RGB")
|
141 |
control_image = control_image.resize((512, 512), Image.LANCZOS)
|
142 |
|
|
|
160 |
with torch.no_grad():
|
161 |
generated_images = pipeline(
|
162 |
prompt,
|
163 |
+
negative_prompt,
|
164 |
image=input_image_for_pipeline,
|
165 |
+
num_inference_steps=25,
|
166 |
+
guidance_scale=8.0,
|
167 |
+
strength = 0.85,
|
168 |
generator=generator,
|
169 |
).images
|
170 |
|