Spaces:
Paused
Paused
Commit
·
9b719a7
1
Parent(s):
94e6a4f
Update app.py
Browse files
app.py
CHANGED
@@ -13,13 +13,13 @@ if torch.cuda.is_available():
|
|
13 |
torch.cuda.max_memory_allocated(device=device)
|
14 |
torch.cuda.empty_cache()
|
15 |
|
16 |
-
pipe = DiffusionPipeline.from_pretrained("
|
17 |
pipe.enable_xformers_memory_efficient_attention()
|
18 |
pipe = pipe.to(device)
|
19 |
torch.cuda.empty_cache()
|
20 |
|
21 |
else:
|
22 |
-
pipe = DiffusionPipeline.from_pretrained("
|
23 |
pipe = pipe.to(device)
|
24 |
refiner = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", use_safetensors=False)
|
25 |
refiner = refiner.to(device)
|
|
|
13 |
torch.cuda.max_memory_allocated(device=device)
|
14 |
torch.cuda.empty_cache()
|
15 |
|
16 |
+
pipe = DiffusionPipeline.from_pretrained("dreamlike-art/dreamlike-photoreal-2.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=False)
|
17 |
pipe.enable_xformers_memory_efficient_attention()
|
18 |
pipe = pipe.to(device)
|
19 |
torch.cuda.empty_cache()
|
20 |
|
21 |
else:
|
22 |
+
pipe = DiffusionPipeline.from_pretrained("dreamlike-art/dreamlike-photoreal-2.0", use_safetensors=False)
|
23 |
pipe = pipe.to(device)
|
24 |
refiner = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", use_safetensors=False)
|
25 |
refiner = refiner.to(device)
|