Skip to content

Commit

Permalink
fix text-guided bug
Browse files Browse the repository at this point in the history
  • Loading branch information
liuwenran committed Dec 8, 2023
1 parent 55a3a2d commit 687f16b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions projects/powerpaint/gradio_PowerPaint.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,14 @@ def infer(input_image, text_guided_prompt, text_guided_negative_prompt,
elif task == 'shape-guided':
prompt = shape_guided_prompt
negative_prompt = shape_guided_negative_prompt
else:
elif task == 'object-removal':
prompt = ''
negative_prompt = ''
scale = 10.0
else:
task = 'text-guided'
prompt = text_guided_prompt
negative_prompt = text_guided_negative_prompt

if enable_control:
return predict_controlnet(input_image, input_control_image,
Expand Down Expand Up @@ -374,8 +378,7 @@ def select_tab_shape_guided():
inpaint_result = gr.Image()
gr.Markdown('### Mask')
gallery = gr.Gallery(
label='Generated images', show_label=False).style(
grid=[2], height='auto')
label='Generated images', show_label=False, columns=2)

run_button.click(
fn=infer,
Expand Down

0 comments on commit 687f16b

Please # to comment.