zwl commited on
Commit
4d64dec
1 Parent(s): e63928b

update interface of img2img

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -128,7 +128,7 @@ def img_to_img(model_path, prompt, neg_prompt, img, strength, guidance, steps, w
128
  prompt,
129
  negative_prompt = neg_prompt,
130
  # num_images_per_prompt=n_images,
131
- init_image = img,
132
  num_inference_steps = int(steps),
133
  strength = strength,
134
  guidance_scale = guidance,
@@ -252,6 +252,7 @@ with gr.Blocks(css=css) as demo:
252
  with gr.Tab("Image to image"):
253
  with gr.Group():
254
  image = gr.Image(label="Image", height=256, tool="editor", type="pil")
 
255
  strength = gr.Slider(label="Transformation strength", minimum=0, maximum=1, step=0.01, value=0.5)
256
 
257
  # model_name.change(lambda x: gr.update(visible = x == models[0].name), inputs=model_name, outputs=custom_model_group)
 
128
  prompt,
129
  negative_prompt = neg_prompt,
130
  # num_images_per_prompt=n_images,
131
+ image = img,
132
  num_inference_steps = int(steps),
133
  strength = strength,
134
  guidance_scale = guidance,
 
252
  with gr.Tab("Image to image"):
253
  with gr.Group():
254
  image = gr.Image(label="Image", height=256, tool="editor", type="pil")
255
+ guidance = gr.Slider(label="Guidance scale", value=7.5, maximum=15)
256
  strength = gr.Slider(label="Transformation strength", minimum=0, maximum=1, step=0.01, value=0.5)
257
 
258
  # model_name.change(lambda x: gr.update(visible = x == models[0].name), inputs=model_name, outputs=custom_model_group)