el-el-san commited on
Commit
07287b4
·
verified ·
1 Parent(s): 2765465

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -41,7 +41,7 @@ MAX_IMAGE_SIZE = 1216
41
  @spaces.GPU
42
  def infer(image: PIL.Image.Image, prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps) -> PIL.Image.Image:
43
  # Check if the input image is a valid PIL Image and is not empty
44
- if isinstance(image, PIL.Image.Image) and image.size != (0, 0):
45
  use_image = True
46
  width, height = image['composite'].size
47
  ratio = np.sqrt(1024. * 1024. / (width * height))
 
41
  @spaces.GPU
42
  def infer(image: PIL.Image.Image, prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps) -> PIL.Image.Image:
43
  # Check if the input image is a valid PIL Image and is not empty
44
+ if isinstance(image, PIL.Image.Image) :
45
  use_image = True
46
  width, height = image['composite'].size
47
  ratio = np.sqrt(1024. * 1024. / (width * height))