lixiang46 commited on
Commit
7531872
1 Parent(s): 15341ef

debug examples

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -41,7 +41,7 @@ def infer(prompt,
41
  guidance_scale = 5.0,
42
  num_inference_steps = 25
43
  ):
44
- if mask_image != None:
45
  image = dict({'background': image, 'layers': [mask_image]})
46
  if randomize_seed:
47
  seed = random.randint(0, MAX_SEED)
@@ -148,7 +148,7 @@ with gr.Blocks(css=css) as Kolors:
148
 
149
  run_button.click(
150
  fn = infer,
151
- inputs = [prompt, image, None, negative_prompt, seed, randomize_seed, guidance_scale, num_inference_steps],
152
  outputs = [result]
153
  )
154
 
 
41
  guidance_scale = 5.0,
42
  num_inference_steps = 25
43
  ):
44
+ if not isinstance(image, dict):
45
  image = dict({'background': image, 'layers': [mask_image]})
46
  if randomize_seed:
47
  seed = random.randint(0, MAX_SEED)
 
148
 
149
  run_button.click(
150
  fn = infer,
151
+ inputs = [prompt, image, mask_image, negative_prompt, seed, randomize_seed, guidance_scale, num_inference_steps],
152
  outputs = [result]
153
  )
154