SkalskiP commited on
Commit
4f5bd18
1 Parent(s): 641c820

one more test with user HF_TOKEN

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -95,6 +95,7 @@ def run_flux(
95
  num_inference_steps_slider: int,
96
  resolution_wh: Tuple[int, int],
97
  ) -> Image.Image:
 
98
  width, height = resolution_wh
99
  if randomize_seed_checkbox:
100
  seed_slicer = random.randint(0, MAX_SEED)
@@ -121,8 +122,7 @@ def process(
121
  seed_slicer: int,
122
  randomize_seed_checkbox: bool,
123
  strength_slider: float,
124
- num_inference_steps_slider: int,
125
- progress=gr.Progress(track_tqdm=True)
126
  ):
127
  if not inpainting_prompt_text:
128
  gr.Info("Please enter a text prompt.")
@@ -147,11 +147,13 @@ def process(
147
  return None, None
148
 
149
  if is_mask_empty(mask):
 
150
  mask = client.predict(
151
  image_input=handle_file(image_path),
152
  text_input=masking_prompt_text,
153
  api_name="/process_image")
154
  mask = Image.open(mask)
 
155
 
156
  width, height = calculate_image_dimensions_for_flux(original_resolution_wh=image.size)
157
  image = image.resize((width, height), Image.LANCZOS)
 
95
  num_inference_steps_slider: int,
96
  resolution_wh: Tuple[int, int],
97
  ) -> Image.Image:
98
+ print("Running FLUX...")
99
  width, height = resolution_wh
100
  if randomize_seed_checkbox:
101
  seed_slicer = random.randint(0, MAX_SEED)
 
122
  seed_slicer: int,
123
  randomize_seed_checkbox: bool,
124
  strength_slider: float,
125
+ num_inference_steps_slider: int
 
126
  ):
127
  if not inpainting_prompt_text:
128
  gr.Info("Please enter a text prompt.")
 
147
  return None, None
148
 
149
  if is_mask_empty(mask):
150
+ print("Generating mask...")
151
  mask = client.predict(
152
  image_input=handle_file(image_path),
153
  text_input=masking_prompt_text,
154
  api_name="/process_image")
155
  mask = Image.open(mask)
156
+ print("Mask generated.")
157
 
158
  width, height = calculate_image_dimensions_for_flux(original_resolution_wh=image.size)
159
  image = image.resize((width, height), Image.LANCZOS)