Veda_Sahaja
commited on
Commit
·
304cbd6
1
Parent(s):
1319924
Update space
Browse files
app.py
CHANGED
|
@@ -70,11 +70,11 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
| 70 |
|
| 71 |
if torch.cuda.is_available():
|
| 72 |
torch.cuda.max_memory_allocated(device=device)
|
| 73 |
-
pipe = DiffusionPipeline.from_pretrained("stabilityai/
|
| 74 |
pipe.enable_xformers_memory_efficient_attention()
|
| 75 |
pipe = pipe.to(device)
|
| 76 |
else:
|
| 77 |
-
pipe = DiffusionPipeline.from_pretrained("stabilityai/
|
| 78 |
pipe = pipe.to(device)
|
| 79 |
|
| 80 |
MAX_SEED = np.iinfo(np.int32).max
|
|
|
|
| 70 |
|
| 71 |
if torch.cuda.is_available():
|
| 72 |
torch.cuda.max_memory_allocated(device=device)
|
| 73 |
+
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True)
|
| 74 |
pipe.enable_xformers_memory_efficient_attention()
|
| 75 |
pipe = pipe.to(device)
|
| 76 |
else:
|
| 77 |
+
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", use_safetensors=True)
|
| 78 |
pipe = pipe.to(device)
|
| 79 |
|
| 80 |
MAX_SEED = np.iinfo(np.int32).max
|