Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -10,14 +10,15 @@ from pathlib import Path
|
|
10 |
Path("tmp").mkdir(exist_ok=True)
|
11 |
|
12 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
|
|
13 |
pipe = StableDiffusionLDM3DPipeline.from_pretrained(
|
14 |
"Intel/ldm3d-4c",
|
15 |
torch_dtype=torch.float16
|
16 |
# , safety_checker=None
|
17 |
)
|
18 |
pipe.to(device)
|
19 |
-
|
20 |
-
pipe.enable_xformers_memory_efficient_attention()
|
21 |
pipe.enable_model_cpu_offload()
|
22 |
|
23 |
|
|
|
10 |
Path("tmp").mkdir(exist_ok=True)
|
11 |
|
12 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
13 |
+
print(f"Device is {device}")
|
14 |
+
device = "cpu"
|
15 |
pipe = StableDiffusionLDM3DPipeline.from_pretrained(
|
16 |
"Intel/ldm3d-4c",
|
17 |
torch_dtype=torch.float16
|
18 |
# , safety_checker=None
|
19 |
)
|
20 |
pipe.to(device)
|
21 |
+
pipe.enable_xformers_memory_efficient_attention()
|
|
|
22 |
pipe.enable_model_cpu_offload()
|
23 |
|
24 |
|