HaloMaster commited on
Commit
ec8d02b
1 Parent(s): 15b949a

修复img2img的报错

Browse files

参数名错了一个,另外两个多余。

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -25,7 +25,7 @@ pipe_img2img = StableDiffusionImg2ImgPipeline(**pipe_text2img.components).to(dev
25
  def infer_text2img(prompt, guide, steps, width, height, image_in, strength):
26
  if image_in is not None:
27
  init_image = image_in.convert("RGB").resize((width, height))
28
- output = pipe_img2img(prompt, init_image=init_image, strength=strength, width=width, height=height, guidance_scale=guide, num_inference_steps=steps)
29
  else:
30
  output = pipe_text2img(prompt, width=width, height=height, guidance_scale=guide, num_inference_steps=steps,)
31
  image = output.images[0]
 
25
  def infer_text2img(prompt, guide, steps, width, height, image_in, strength):
26
  if image_in is not None:
27
  init_image = image_in.convert("RGB").resize((width, height))
28
+ output = pipe_img2img(prompt, image=init_image, strength=strength, guidance_scale=guide, num_inference_steps=steps)
29
  else:
30
  output = pipe_text2img(prompt, width=width, height=height, guidance_scale=guide, num_inference_steps=steps,)
31
  image = output.images[0]