Spaces:
Running
on
Zero
Running
on
Zero
Upload genimage.py
Browse files- genimage.py +2 -3
genimage.py
CHANGED
@@ -2,12 +2,11 @@ import spaces
|
|
2 |
|
3 |
|
4 |
def load_pipeline():
|
5 |
-
from diffusers import
|
6 |
import torch
|
7 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
8 |
-
pipe =
|
9 |
"John6666/rae-diffusion-xl-v2-sdxl-spo-pcm",
|
10 |
-
custom_pipeline="lpw_stable_diffusion_xl",
|
11 |
torch_dtype=torch.float16,
|
12 |
)
|
13 |
pipe.to(device)
|
|
|
2 |
|
3 |
|
4 |
def load_pipeline():
|
5 |
+
from diffusers import StableDiffusionXLPipeline
|
6 |
import torch
|
7 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
8 |
+
pipe = StableDiffusionXLPipeline.from_pretrained(
|
9 |
"John6666/rae-diffusion-xl-v2-sdxl-spo-pcm",
|
|
|
10 |
torch_dtype=torch.float16,
|
11 |
)
|
12 |
pipe.to(device)
|