Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,29 +10,30 @@ theme = gr.themes.Base(
|
|
| 10 |
font=[gr.themes.GoogleFont('Libre Franklin'), gr.themes.GoogleFont('Public Sans'), 'system-ui', 'sans-serif'],
|
| 11 |
)
|
| 12 |
|
|
|
|
| 13 |
pipe_xlc = AutoPipelineForText2Image.from_pretrained(
|
| 14 |
"temp-org-cc/CommonCanvas-XLC",
|
| 15 |
custom_pipeline="multimodalart/sdxl_perturbed_attention_guidance",
|
| 16 |
torch_dtype=torch.float16
|
| 17 |
-
)
|
|
|
|
| 18 |
pipe_xlnc = AutoPipelineForText2Image.from_pretrained(
|
| 19 |
"temp-org-cc/CommonCanvas-XLNC",
|
| 20 |
custom_pipeline="multimodalart/sdxl_perturbed_attention_guidance",
|
| 21 |
torch_dtype=torch.float16
|
| 22 |
-
)
|
|
|
|
| 23 |
pipe_sc = AutoPipelineForText2Image.from_pretrained(
|
| 24 |
"temp-org-cc/CommonCanvas-SC",
|
| 25 |
custom_pipeline="hyoungwoncho/sd_perturbed_attention_guidance",
|
| 26 |
torch_dtype=torch.float16
|
| 27 |
-
)
|
|
|
|
| 28 |
pipe_snc = AutoPipelineForText2Image.from_pretrained(
|
| 29 |
"temp-org-cc/CommonCanvas-SNC",
|
| 30 |
custom_pipeline="hyoungwoncho/sd_perturbed_attention_guidance",
|
| 31 |
torch_dtype=torch.float16
|
| 32 |
-
)
|
| 33 |
-
|
| 34 |
-
device="cuda"
|
| 35 |
-
pipe = pipe.to(device)
|
| 36 |
|
| 37 |
@spaces.GPU
|
| 38 |
def run_xlc(prompt, negative_prompt=None, guidance_scale=7.0, pag_scale=3.0, pag_layers=["mid"], randomize_seed=True, seed=42, progress=gr.Progress(track_tqdm=True)):
|
|
|
|
| 10 |
font=[gr.themes.GoogleFont('Libre Franklin'), gr.themes.GoogleFont('Public Sans'), 'system-ui', 'sans-serif'],
|
| 11 |
)
|
| 12 |
|
| 13 |
+
device="cuda"
|
| 14 |
pipe_xlc = AutoPipelineForText2Image.from_pretrained(
|
| 15 |
"temp-org-cc/CommonCanvas-XLC",
|
| 16 |
custom_pipeline="multimodalart/sdxl_perturbed_attention_guidance",
|
| 17 |
torch_dtype=torch.float16
|
| 18 |
+
).to(device)
|
| 19 |
+
|
| 20 |
pipe_xlnc = AutoPipelineForText2Image.from_pretrained(
|
| 21 |
"temp-org-cc/CommonCanvas-XLNC",
|
| 22 |
custom_pipeline="multimodalart/sdxl_perturbed_attention_guidance",
|
| 23 |
torch_dtype=torch.float16
|
| 24 |
+
).to(device)
|
| 25 |
+
|
| 26 |
pipe_sc = AutoPipelineForText2Image.from_pretrained(
|
| 27 |
"temp-org-cc/CommonCanvas-SC",
|
| 28 |
custom_pipeline="hyoungwoncho/sd_perturbed_attention_guidance",
|
| 29 |
torch_dtype=torch.float16
|
| 30 |
+
).to(device)
|
| 31 |
+
|
| 32 |
pipe_snc = AutoPipelineForText2Image.from_pretrained(
|
| 33 |
"temp-org-cc/CommonCanvas-SNC",
|
| 34 |
custom_pipeline="hyoungwoncho/sd_perturbed_attention_guidance",
|
| 35 |
torch_dtype=torch.float16
|
| 36 |
+
).to(device)
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
@spaces.GPU
|
| 39 |
def run_xlc(prompt, negative_prompt=None, guidance_scale=7.0, pag_scale=3.0, pag_layers=["mid"], randomize_seed=True, seed=42, progress=gr.Progress(track_tqdm=True)):
|