Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,8 @@ text_pipeline.set_ip_adapter_scale(0.6)
|
|
10 |
|
11 |
|
12 |
def text_to_image(ip, prompt, neg_prompt, width, height, ip_scale, strength, guidance, steps):
|
|
|
|
|
13 |
text_pipeline.set_ip_adapter_scale(ip_scale)
|
14 |
|
15 |
images = text_pipeline(
|
@@ -52,8 +54,8 @@ with gr.Blocks() as demo:
|
|
52 |
|
53 |
with gr.Accordion("Advanced Settings", open=False):
|
54 |
neg_prompt = gr.Textbox(label='Negative Prompt', value='ugly, deformed, nsfw')
|
55 |
-
width_slider = gr.Slider(256, 1024, value=1024, label="Width")
|
56 |
-
height_slider = gr.Slider(256, 1024, value=1024, label="Height")
|
57 |
ip_scale_slider = gr.Slider(0.0, 1.0, value=0.6, label="IP-Adapter Scale")
|
58 |
strength_slider = gr.Slider(0.0, 1.0, value=0.7, label="Strength")
|
59 |
guidance_slider = gr.Slider(1.0, 15.0, value=7.5, label="Guidance")
|
|
|
10 |
|
11 |
|
12 |
def text_to_image(ip, prompt, neg_prompt, width, height, ip_scale, strength, guidance, steps):
|
13 |
+
ip.thumbnail((1024, 1024))
|
14 |
+
|
15 |
text_pipeline.set_ip_adapter_scale(ip_scale)
|
16 |
|
17 |
images = text_pipeline(
|
|
|
54 |
|
55 |
with gr.Accordion("Advanced Settings", open=False):
|
56 |
neg_prompt = gr.Textbox(label='Negative Prompt', value='ugly, deformed, nsfw')
|
57 |
+
width_slider = gr.Slider(256, 1024, value=1024, step=8, label="Width")
|
58 |
+
height_slider = gr.Slider(256, 1024, value=1024, step=8, label="Height")
|
59 |
ip_scale_slider = gr.Slider(0.0, 1.0, value=0.6, label="IP-Adapter Scale")
|
60 |
strength_slider = gr.Slider(0.0, 1.0, value=0.7, label="Strength")
|
61 |
guidance_slider = gr.Slider(1.0, 15.0, value=7.5, label="Guidance")
|