Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -91,14 +91,19 @@ if not SSD_1B:
|
|
| 91 |
variant=variant,
|
| 92 |
cache_dir=cache_path,
|
| 93 |
)
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
|
| 103 |
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
|
| 104 |
if torch.cuda.is_available():
|
|
|
|
| 91 |
variant=variant,
|
| 92 |
cache_dir=cache_path,
|
| 93 |
)
|
| 94 |
+
|
| 95 |
+
# "stabilityai/stable-diffusion-xl-base-1.0",
|
| 96 |
+
model_id"stabilityai/sdxl-turbo",
|
| 97 |
+
#pipe = DiffusionPipeline.from_pretrained(
|
| 98 |
+
# model_id=model_id,
|
| 99 |
+
# unet=unet,
|
| 100 |
+
# torch_dtype=torch_dtype,
|
| 101 |
+
# variant=variant,
|
| 102 |
+
# cache_dir=cache_path,
|
| 103 |
+
# )
|
| 104 |
+
from diffusers import StableDiffusionPipeline
|
| 105 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float32)
|
| 106 |
+
|
| 107 |
|
| 108 |
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
|
| 109 |
if torch.cuda.is_available():
|