Spaces:
Runtime error
Runtime error
Commit ·
e0a1f6f
1
Parent(s): 809d957
Update app.py
Browse files106 unmodified lines1071081091101111121101131141151161131141171181191201215 unmodified lines12712812912613013113213316 unmodified lines1501511521491531541551562 unmodified lines159160161158162163164161165166167168165169170171172173106 unmodified linestheme = "Base"
with gr.Blocks(css=css) as demo: with gr.Row(): gr.Markdown(""" <h1><center>Stable Diffusion</center></h1>
""") with gr.Row(): with gr.Column(scale=6, min_width=600): prompt = gr.Textbox("puppies in a cloud, 4k", placeholder="Prompt", show_label=False, lines=3) negative_prompt = gr.Textbox(placeholder="Negative Prompt", show_label=False, lines=3) prompt = gr.Textbox(label="Prompt", placeholder="beautiful cat, 8k", show_label=False, lines=2) negative_prompt = gr.Textbox(label="Negative Prompt", value="text, blurry, fuzziness", placeholder="What you don't want to see in the image", show_label=False, lines=3) with gr.Column(): text_button = gr.Button("Generate", variant='primary', elem_id="generate") with gr.Row():5 unmodified lines with gr.Tab("Generation"): with gr.Row(): with gr.Column(scale=1): sampler = gr.Dropdown(value="Euler a", show_label=True, label="Sampling Method", choices=[ sampler = gr.Dropdown(value="DPM++ SDE", show_label=True, label="Sampler", choices=[ "Euler", "Euler a", "LMS",16 unmodified lines ]) with gr.Column(scale=1): steps = gr.Slider(label="Sampling Steps", minimum=1, maximum=50, value=25, step=1) steps = gr.Slider(label="Steps", minimum=1, maximum=50, value=25, step=1)
with gr.Row(): with gr.Column(scale=1):2 unmodified lines with gr.Column(scale=1): batch_size = gr.Slider(label="Batch Size", maximum=1, value=1) batch_count = gr.Slider(label="Batch Count", maximum=1, value=1) batch_count = gr.Slider(label="Batch Count", maximum=4, minimum=1, value=2, step=1)
cfg_scale = gr.Slider(label="CFG Scale", minimum=1, maximum=20, value=7, step=1) seed = gr.Number(label="Seed", value=-1) seed = gr.Number(label="Seed", value=-1, info = """'-1' is a random seed""")
with gr.Column(scale=2): image_output = gr.Image() image_output = gr.Gallery(label="Result Image(s)", show_download_button=False, show_share_button=True)
text_button.click(flip_text, inputs=[prompt, negative_prompt, model, steps, sampler, cfg_scale, width, height, seed], outputs=image_output) app.py+13-8