multimodalart HF staff commited on
Commit
68c53ae
1 Parent(s): af3511e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -0
app.py CHANGED
@@ -113,6 +113,28 @@ with gr.Blocks(css=css, theme=theme) as demo:
113
  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")
114
  randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
115
  seed = gr.Slider(minimum=1, maximum=9007199254740991, step=1, randomize=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  #gr.Examples(fn=run, examples=[" ", "an insect robot preparing a delicious meal, anime style", "a photo of a group of friends at an amusement park"], inputs=prompt, outputs=[output, seed], cache_examples=True)
117
  gr.on(
118
  triggers=[
 
113
  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")
114
  randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
115
  seed = gr.Slider(minimum=1, maximum=9007199254740991, step=1, randomize=True)
116
+
117
+
118
+ gr.Accordion("Use it with diffusers, ComfyUI, AUTOMATIC111", open=False):
119
+ 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.
120
+ ## Using it with diffusers
121
+ ```py
122
+ from diffusers import AutoPipelineForText2Image
123
+ pipe = AutoPipelineForText2Image.from_pretrained(
124
+ "temp-org-cc/CommonCanvas-XLC", #here you can pick between
125
+ custom_pipeline="multimodalart/sdxl_perturbed_attention_guidance",
126
+ torch_dtype=torch.float16
127
+ ).to(device)
128
+
129
+ prompt = "a cat"
130
+ image = pipe_xlc(prompt, num_inference_steps=25).images[0]
131
+ ```
132
+ ## Using it ComfyUI/Automatic1111
133
+ - [CommonCanvasSC.safetensors](#) (SD2 drop-in replacement, commercial)
134
+ - [CommonCanvasSNC.safetensors](#) (SD2 drop-in replacement, non-commercial - trained on more data)
135
+ - [CommonCanvasXLC.safetensors](#) (SDXL drop-in replacement, commercial)
136
+ - [CommonCanvasXLNC.safetensors](#) (SDXL drop-in replacement, non-commercial - trained on more data)
137
+ ''')
138
  #gr.Examples(fn=run, examples=[" ", "an insect robot preparing a delicious meal, anime style", "a photo of a group of friends at an amusement park"], inputs=prompt, outputs=[output, seed], cache_examples=True)
139
  gr.on(
140
  triggers=[