yash
commited on
Commit
•
c3e53f9
1
Parent(s):
d8eede0
remove scheduler
Browse files
app.py
CHANGED
@@ -3,7 +3,6 @@ import gradio as gr
|
|
3 |
from diffusers import StableDiffusionImg2ImgPipeline
|
4 |
from diffusers import DDIMScheduler,EulerDiscreteScheduler,EulerAncestralDiscreteScheduler,UniPCMultistepScheduler
|
5 |
from diffusers import KDPM2DiscreteScheduler,KDPM2AncestralDiscreteScheduler,PNDMScheduler
|
6 |
-
from diffusers import DPMSolverMultistepScheduler
|
7 |
import random
|
8 |
|
9 |
|
@@ -41,8 +40,6 @@ def set_pipeline(model_id_repo,scheduler):
|
|
41 |
"DPM2 Karras": KDPM2DiscreteScheduler,
|
42 |
"DPM2 a Karras": KDPM2AncestralDiscreteScheduler,
|
43 |
"PNDM": PNDMScheduler,
|
44 |
-
"DPM++ 2M Karras": DPMSolverMultistepScheduler,
|
45 |
-
"DPM++ 2M SDE Karras": DPMSolverMultistepScheduler,
|
46 |
}
|
47 |
|
48 |
sampler_name = scheduler # Example sampler name, replace with the actual value
|
@@ -115,7 +112,7 @@ with block as image_gen:
|
|
115 |
run_btn = gr.Button("image generation", elem_id="select_btn", variant="primary")
|
116 |
with gr.Accordion(label="Advance Options",open=False):
|
117 |
model_selection = gr.Dropdown(choices=["runwayml","Realistic_Vision_V5_1_noVAE"],value="Realistic_Vision_V5_1_noVAE",label="Models")
|
118 |
-
schduler_selection = gr.Dropdown(choices=["DDIM","Euler","Euler a","UniPC","DPM2 Karras","DPM2 a Karras","PNDM"
|
119 |
strength_slider = gr.Slider(label="strength", minimum=0, maximum=1, value=0.8, step=0.05)
|
120 |
guidance_scale_slider = gr.Slider(label="guidance_scale", minimum=0, maximum=15, value=7.5, step=0.5)
|
121 |
num_images_per_prompt_slider = gr.Slider(label="num_images_per_prompt", minimum=0, maximum=5, value=1, step=1)
|
|
|
3 |
from diffusers import StableDiffusionImg2ImgPipeline
|
4 |
from diffusers import DDIMScheduler,EulerDiscreteScheduler,EulerAncestralDiscreteScheduler,UniPCMultistepScheduler
|
5 |
from diffusers import KDPM2DiscreteScheduler,KDPM2AncestralDiscreteScheduler,PNDMScheduler
|
|
|
6 |
import random
|
7 |
|
8 |
|
|
|
40 |
"DPM2 Karras": KDPM2DiscreteScheduler,
|
41 |
"DPM2 a Karras": KDPM2AncestralDiscreteScheduler,
|
42 |
"PNDM": PNDMScheduler,
|
|
|
|
|
43 |
}
|
44 |
|
45 |
sampler_name = scheduler # Example sampler name, replace with the actual value
|
|
|
112 |
run_btn = gr.Button("image generation", elem_id="select_btn", variant="primary")
|
113 |
with gr.Accordion(label="Advance Options",open=False):
|
114 |
model_selection = gr.Dropdown(choices=["runwayml","Realistic_Vision_V5_1_noVAE"],value="Realistic_Vision_V5_1_noVAE",label="Models")
|
115 |
+
schduler_selection = gr.Dropdown(choices=["DDIM","Euler","Euler a","UniPC","DPM2 Karras","DPM2 a Karras","PNDM"],value="Euler a",label="Scheduler")
|
116 |
strength_slider = gr.Slider(label="strength", minimum=0, maximum=1, value=0.8, step=0.05)
|
117 |
guidance_scale_slider = gr.Slider(label="guidance_scale", minimum=0, maximum=15, value=7.5, step=0.5)
|
118 |
num_images_per_prompt_slider = gr.Slider(label="num_images_per_prompt", minimum=0, maximum=5, value=1, step=1)
|