Commit ·
7f24de3
1
Parent(s): 0ed20b9
refactor: Remove resolution parameters and update guidance scale in app.py
Browse files- Eliminated the resolution parameter from the submit_function_flux, simplifying the function signature.
- Adjusted the guidance scale slider's maximum value from 7.5 to 50, enhancing user control over the model's behavior.
- Updated the UI layout for result image display, ensuring consistency in the application interface.
286 unmodified lines287288289290290291292293294296297298299300295296297269 unmodified lines5675685695765705715725734 unmodified lines578579580587588589581582592583584585586286 unmodified lines person_image, cloth_image, cloth_type, resolution, num_inference_steps, guidance_scale, seed, show_type): # Set height and width based on resolution height = resolution width = int(height * 0.75) args.width = width args.height = height
# Process image editor input person_image, mask = person_image["background"], person_image["layers"][0]269 unmodified lines ) # Guidence Scale guidance_scale_flux = gr.Slider( label="CFG Strenth", minimum=0.0, maximum=7.5, step=0.5, value=2.5 label="CFG Strenth", minimum=0.0, maximum=50, step=0.5, value=30 ) # Random Seed seed_flux = gr.Slider(4 unmodified lines choices=["result only", "input & result", "input & mask & result"], value="input & mask & result", )
with gr.Column(scale=2, min_width=500): result_image_flux = gr.Image(interactive=False, label="Result") with gr.Column(scale=2, min_width=500): result_image_p2p = gr.Image(interactive=False, label="Result") result_image_flux = gr.Image(interactive=False, label="Result") with gr.Row(): # Photo Examples root_path = "resource/demo/example"app.py+2-11