Spaces:
Running
on
Zero
Running
on
Zero
zhengchong
commited on
Commit
·
f97271b
1
Parent(s):
f86262e
refactor: Simplify output handling in submit_function_flux by removing return_dict
Browse files- Removed the `return_dict` parameter from the `submit_function_flux` function, streamlining the output to directly return the first image from the results. This change enhances code clarity and reduces complexity in the function's return value management.
app.py
CHANGED
@@ -333,9 +333,8 @@ def submit_function_flux(
|
|
333 |
mask_image=mask,
|
334 |
num_inference_steps=num_inference_steps,
|
335 |
guidance_scale=guidance_scale,
|
336 |
-
generator=generator
|
337 |
-
|
338 |
-
)[0]
|
339 |
|
340 |
# Post-processing
|
341 |
masked_person = vis_mask(person_image, mask)
|
|
|
333 |
mask_image=mask,
|
334 |
num_inference_steps=num_inference_steps,
|
335 |
guidance_scale=guidance_scale,
|
336 |
+
generator=generator
|
337 |
+
).images[0]
|
|
|
338 |
|
339 |
# Post-processing
|
340 |
masked_person = vis_mask(person_image, mask)
|