AsmaAILab commited on
Commit
961921f
·
verified ·
1 Parent(s): c2b00dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -136,7 +136,7 @@ def generate_image_for_gradio(
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,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=30,
165
- guidance_scale=7.5,
 
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