Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -98,32 +98,31 @@ with gr.Blocks(css=css, theme=theme) as demo:
|
|
| 98 |
[CommonCanvas suite of models](https://huggingface.co/collections/temp-org-cc/commoncanvas-66226ef9688b3580a5954653) trained on [CommonCatalogue](https://huggingface.co/collections/temp-org-cc/commoncatalogue-6530907589ffafffe87c31c5), ~70M Creative Commons images.
|
| 99 |
''')
|
| 100 |
#with gr.Group():
|
| 101 |
-
|
| 102 |
with gr.Row():
|
| 103 |
prompt_xlc = gr.Textbox(show_label=False, scale=4, placeholder="Your prompt for XL-C")
|
| 104 |
button_xlc = gr.Button("Generate", min_width=120)
|
| 105 |
-
|
| 106 |
with gr.Row():
|
| 107 |
prompt_xlnc = gr.Textbox(show_label=False, scale=4, placeholder="Your prompt for XL-NC")
|
| 108 |
button_xlnc = gr.Button("Generate", min_width=120)
|
| 109 |
-
|
| 110 |
with gr.Row():
|
| 111 |
prompt_sc = gr.Textbox(show_label=False, scale=4, placeholder="Your prompt for S-C")
|
| 112 |
button_sc = gr.Button("Generate", min_width=120)
|
| 113 |
-
|
| 114 |
with gr.Row():
|
| 115 |
prompt_snc = gr.Textbox(show_label=False, scale=4, placeholder="Your prompt for S-NC")
|
| 116 |
button_snc = gr.Button("Generate", min_width=120)
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
|
| 126 |
-
|
| 127 |
with gr.Accordion("Use it with 🧨 diffusers, ComfyUI, AUTOMATIC111, Forge, SD.Next, Invoke, etc.", open=False):
|
| 128 |
gr.Markdown('''The CommonCanvas S and CommonCanvas XL collections are drop-in replacements of Stable Diffusion 2 and Stable Diffusion XL respectively and can be used as such with `diffusers` or in UIs such as ComfyUI, AUTOMATIC1111, SDNext, InvokeAI, etc.
|
| 129 |
## Using it with diffusers
|
|
|
|
| 98 |
[CommonCanvas suite of models](https://huggingface.co/collections/temp-org-cc/commoncanvas-66226ef9688b3580a5954653) trained on [CommonCatalogue](https://huggingface.co/collections/temp-org-cc/commoncatalogue-6530907589ffafffe87c31c5), ~70M Creative Commons images.
|
| 99 |
''')
|
| 100 |
#with gr.Group():
|
| 101 |
+
with gr.Tab("XL-C model"):
|
| 102 |
with gr.Row():
|
| 103 |
prompt_xlc = gr.Textbox(show_label=False, scale=4, placeholder="Your prompt for XL-C")
|
| 104 |
button_xlc = gr.Button("Generate", min_width=120)
|
| 105 |
+
with gr.Tab("XL-NC model"):
|
| 106 |
with gr.Row():
|
| 107 |
prompt_xlnc = gr.Textbox(show_label=False, scale=4, placeholder="Your prompt for XL-NC")
|
| 108 |
button_xlnc = gr.Button("Generate", min_width=120)
|
| 109 |
+
with gr.Tab("S-C model"):
|
| 110 |
with gr.Row():
|
| 111 |
prompt_sc = gr.Textbox(show_label=False, scale=4, placeholder="Your prompt for S-C")
|
| 112 |
button_sc = gr.Button("Generate", min_width=120)
|
| 113 |
+
with gr.Tab("S-NC model"):
|
| 114 |
with gr.Row():
|
| 115 |
prompt_snc = gr.Textbox(show_label=False, scale=4, placeholder="Your prompt for S-NC")
|
| 116 |
button_snc = gr.Button("Generate", min_width=120)
|
| 117 |
+
output = gr.Image(label="Your result", interactive=False)
|
| 118 |
+
with gr.Accordion("Advanced Settings", open=False):
|
| 119 |
+
guidance_scale = gr.Number(label="CFG Guidance Scale", info="The guidance scale for CFG, ignored if no prompt is entered (unconditional generation)", value=7.0)
|
| 120 |
+
negative_prompt = gr.Textbox(label="Negative prompt", info="Is only applied for the CFG part, leave blank for unconditional generation")
|
| 121 |
+
pag_scale = gr.Number(label="Pag Scale", value=3.0)
|
| 122 |
+
pag_layers = gr.Dropdown(label="Model layers to apply Pag to", info="mid is the one used on the paper, up and down blocks seem unstable", choices=["up", "mid", "down"], multiselect=True, value="mid")
|
| 123 |
+
randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
|
| 124 |
+
seed = gr.Slider(minimum=1, maximum=9007199254740991, step=1, randomize=True)
|
| 125 |
|
|
|
|
| 126 |
with gr.Accordion("Use it with 🧨 diffusers, ComfyUI, AUTOMATIC111, Forge, SD.Next, Invoke, etc.", open=False):
|
| 127 |
gr.Markdown('''The CommonCanvas S and CommonCanvas XL collections are drop-in replacements of Stable Diffusion 2 and Stable Diffusion XL respectively and can be used as such with `diffusers` or in UIs such as ComfyUI, AUTOMATIC1111, SDNext, InvokeAI, etc.
|
| 128 |
## Using it with diffusers
|