hideosnes commited on
Commit
a28e570
1 Parent(s): 305357a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -123,7 +123,7 @@ examples = [
123
  "3d render, 3d model, clean 3d style, cute space monster on mars, isolated clean white background, cinematic lighting",
124
  1.0,
125
  0.0,
126
- 0.45,
127
  ],
128
  [
129
  "./asset/zeichnung1.jpg",
@@ -216,19 +216,16 @@ def create_image(
216
  )
217
 
218
  if input_image is not None:
219
- # input_image = resize_img(input_image, max_side=1024)
220
- input_image = resize_img(input_image, max_side=512)
221
  cv_input_image = pil_to_cv2(input_image)
222
  detected_map = cv2.Canny(cv_input_image, 50, 200)
223
  canny_map = Image.fromarray(cv2.cvtColor(detected_map, cv2.COLOR_BGR2RGB))
224
  else:
225
- # canny_map = Image.new("RGB", (1024, 1024), color=(255, 255, 255))
226
- canny_map = Image.new("RGB", (512, 512), color=(255, 255, 255))
227
  control_scale = 0
228
 
229
  if float(control_scale) == 0:
230
- # canny_map = canny_map.resize((1024, 1024))
231
- canny_map = canny_map.resize((512, 512))
232
 
233
  if len(neg_content_prompt) > 0 and neg_content_scale != 0:
234
  images = ip_model.generate(
 
123
  "3d render, 3d model, clean 3d style, cute space monster on mars, isolated clean white background, cinematic lighting",
124
  1.0,
125
  0.0,
126
+ 0.0,
127
  ],
128
  [
129
  "./asset/zeichnung1.jpg",
 
216
  )
217
 
218
  if input_image is not None:
219
+ input_image = resize_img(input_image, max_side=1024)
 
220
  cv_input_image = pil_to_cv2(input_image)
221
  detected_map = cv2.Canny(cv_input_image, 50, 200)
222
  canny_map = Image.fromarray(cv2.cvtColor(detected_map, cv2.COLOR_BGR2RGB))
223
  else:
224
+ canny_map = Image.new("RGB", (1024, 1024), color=(255, 255, 255))
 
225
  control_scale = 0
226
 
227
  if float(control_scale) == 0:
228
+ canny_map = canny_map.resize((1024, 1024))
 
229
 
230
  if len(neg_content_prompt) > 0 and neg_content_scale != 0:
231
  images = ip_model.generate(