Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,12 +12,11 @@ from diffusers import DiffusionPipeline, EulerDiscreteScheduler
|
|
| 12 |
# For example, you can replace with a local snapshot inside the Space repo.
|
| 13 |
MODEL_ID = os.getenv("MODEL_ID", "Tongyi-MAI/Z-Image-Turbo")
|
| 14 |
|
| 15 |
-
dtype = torch.float16 if torch.cuda.is_available() else torch.float32
|
| 16 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 17 |
|
| 18 |
pipe = DiffusionPipeline.from_pretrained(
|
| 19 |
MODEL_ID,
|
| 20 |
-
torch_dtype=
|
| 21 |
use_safetensors=True,
|
| 22 |
)
|
| 23 |
|
|
|
|
| 12 |
# For example, you can replace with a local snapshot inside the Space repo.
|
| 13 |
MODEL_ID = os.getenv("MODEL_ID", "Tongyi-MAI/Z-Image-Turbo")
|
| 14 |
|
|
|
|
| 15 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 16 |
|
| 17 |
pipe = DiffusionPipeline.from_pretrained(
|
| 18 |
MODEL_ID,
|
| 19 |
+
torch_dtype=torch.bfloat16,
|
| 20 |
use_safetensors=True,
|
| 21 |
)
|
| 22 |
|