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 lines287288289290291292293294295296297298299300301302303269 unmodified lines5735745755765775785794 unmodified lines584585586587588589590591592593594595286 unmodified linesperson_image,cloth_image,cloth_type,resolution,num_inference_steps,guidance_scale,seed,show_type):# Set height and width based on resolutionheight = resolutionwidth = int(height * 0.75)args.width = widthargs.height = height# Process image editor inputperson_image, mask = person_image["background"], person_image["layers"][0]269 unmodified lines)# Guidence Scaleguidance_scale_flux = gr.Slider(label="CFG Strenth", minimum=0.0, maximum=7.5, step=0.5, value=2.5)# Random Seedseed_flux = gr.Slider(4 unmodified lineschoices=["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")with gr.Row():# Photo Examplesroot_path = "resource/demo/example"286 unmodified lines287288289290291292293294295296297269 unmodified lines5675685695705715725734 unmodified lines578579580581582583584585586286 unmodified linesperson_image,cloth_image,cloth_type,num_inference_steps,guidance_scale,seed,show_type):# Process image editor inputperson_image, mask = person_image["background"], person_image["layers"][0]269 unmodified lines)# Guidence Scaleguidance_scale_flux = gr.Slider(label="CFG Strenth", minimum=0.0, maximum=50, step=0.5, value=30)# Random Seedseed_flux = gr.Slider(4 unmodified lineschoices=["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.Row():# Photo Examplesroot_path = "resource/demo/example"
app.py+2-11