NikhilJoson commited on
Commit
50af147
1 Parent(s): 947da21

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -18,7 +18,7 @@ DEVICE = "cuda" #if torch.cuda.is_available() else "cpu"
18
  pipe = FluxInpaintPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16).to(DEVICE)
19
 
20
  @spaces.GPU()
21
- def process(input_image_editor, input_text, strength, seed, randomize_seed, num_inference_steps, guidance_scale=3.5, progress=gr.Progress(track_tqdm=True)):
22
  if not input_text:
23
  raise gr.Error("Please enter a text prompt.")
24
 
@@ -100,7 +100,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
100
 
101
  submit_button_component.click(
102
  fn=process,
103
- inputs=[input_image_component, input_text_component, strength_slider, seed_number, randomize_seed, num_inference_steps, guidance_scale],
104
  outputs=[output_image_component, output_mask_component, output_seed]
105
  )
106
 
 
18
  pipe = FluxInpaintPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16).to(DEVICE)
19
 
20
  @spaces.GPU()
21
+ def process(input_image_editor, mask_image, input_text, strength, seed, randomize_seed, num_inference_steps, guidance_scale=3.5, progress=gr.Progress(track_tqdm=True)):
22
  if not input_text:
23
  raise gr.Error("Please enter a text prompt.")
24
 
 
100
 
101
  submit_button_component.click(
102
  fn=process,
103
+ inputs=[input_image_component, uploaded_mask_component, input_text_component, strength_slider, seed_number, randomize_seed, num_inference_steps, guidance_scale],
104
  outputs=[output_image_component, output_mask_component, output_seed]
105
  )
106