comdoleger commited on
Commit
144fc2a
·
verified ·
1 Parent(s): be2ac33

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -215,9 +215,9 @@ def resize_to_fit(max_size, original_size):
215
 
216
  def process_generate(fore, prompt, intensity, mode, refprompt, isrmbg):
217
 
218
- max_size = (1500,1500)
219
  if prompt in prompt_list:
220
- max_size = (1800,1800)
221
  if isrmbg:
222
  try:
223
  rmbgfore = rmbg(fore)
@@ -235,7 +235,7 @@ def process_generate(fore, prompt, intensity, mode, refprompt, isrmbg):
235
  if size[0]*size[1]<=(768*768):
236
  gr.Warning("ℹ️ The input image resolution is low, it might lead to some deformation!")
237
 
238
- if size[0]*size[1]>(1500*1500):
239
  gr.Warning("ℹ️ The input image size is too big, I will lower it!")
240
  image_width, image_height = resize_to_fit((1500,1500), (image_width, image_height))
241
  fore.resize(max_size)
 
215
 
216
  def process_generate(fore, prompt, intensity, mode, refprompt, isrmbg):
217
 
218
+ max_size = (1400,1400)
219
  if prompt in prompt_list:
220
+ max_size = (1500,1500)
221
  if isrmbg:
222
  try:
223
  rmbgfore = rmbg(fore)
 
235
  if size[0]*size[1]<=(768*768):
236
  gr.Warning("ℹ️ The input image resolution is low, it might lead to some deformation!")
237
 
238
+ if size[0]*size[1]>(max_size[0]*max_size[1]):
239
  gr.Warning("ℹ️ The input image size is too big, I will lower it!")
240
  image_width, image_height = resize_to_fit((1500,1500), (image_width, image_height))
241
  fore.resize(max_size)