el-el-san commited on
Commit
3c890e9
·
verified ·
1 Parent(s): b657258

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -39,9 +39,9 @@ MAX_IMAGE_SIZE = 1216
39
 
40
 
41
  @spaces.GPU
42
- def infer(use_image, 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 use_image :
45
  width, height = image['composite'].size
46
  ratio = np.sqrt(1024. * 1024. / (width * height))
47
  new_width, new_height = int(width * ratio), int(height * ratio)
 
39
 
40
 
41
  @spaces.GPU
42
+ def infer(use_image, image: PIL.Image.Image=None, 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 use_image and image is not None :
45
  width, height = image['composite'].size
46
  ratio = np.sqrt(1024. * 1024. / (width * height))
47
  new_width, new_height = int(width * ratio), int(height * ratio)