fffiloni commited on
Commit
01da3bb
1 Parent(s): b7751ed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -58,7 +58,7 @@ def infer(image_in, prompt, inference_steps, guidance_scale, control_weight):
58
 
59
  n_prompt = 'NSFW, nude, naked, porn, ugly'
60
 
61
- image_in, w, h = resize_image(image_in, "resized_input.jpg", 1024)
62
 
63
  # Canny preprocessing
64
  image_to_canny = load_image(image_in)
@@ -89,6 +89,10 @@ def infer(image_in, prompt, inference_steps, guidance_scale, control_weight):
89
  height=h
90
  ).images[0]
91
 
 
 
 
 
92
  return image, image_to_canny
93
 
94
  css="""
 
58
 
59
  n_prompt = 'NSFW, nude, naked, porn, ugly'
60
 
61
+
62
 
63
  # Canny preprocessing
64
  image_to_canny = load_image(image_in)
 
89
  height=h
90
  ).images[0]
91
 
92
+ image_redim, w, h = resize_image(image_in, "resized_input.jpg", 1024)
93
+
94
+ image = image.resize((w, h), Image.LANCZOS)
95
+
96
  return image, image_to_canny
97
 
98
  css="""