Spaces:
Running
on
A10G
Running
on
A10G
Update app.py
Browse files
app.py
CHANGED
@@ -12,10 +12,10 @@ device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
|
12 |
torch.cuda.max_memory_allocated(device=device)
|
13 |
torch.cuda.empty_cache()
|
14 |
torch.cuda.max_memory_allocated(device=device)
|
15 |
-
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-3.5-medium", torch_dtype=torch.
|
16 |
#pipe.enable_xformers_memory_efficient_attention()
|
17 |
torch.cuda.empty_cache()
|
18 |
-
pipe.enable_model_cpu_offload()
|
19 |
#torch.cuda.max_memory_allocated(device=device)
|
20 |
#refiner = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", use_safetensors=True, torch_dtype=torch.float16, variant="fp16").to(device)
|
21 |
#refiner.enable_xformers_memory_efficient_attention()
|
|
|
12 |
torch.cuda.max_memory_allocated(device=device)
|
13 |
torch.cuda.empty_cache()
|
14 |
torch.cuda.max_memory_allocated(device=device)
|
15 |
+
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-3.5-medium", torch_dtype=torch.float16).to(device)
|
16 |
#pipe.enable_xformers_memory_efficient_attention()
|
17 |
torch.cuda.empty_cache()
|
18 |
+
#pipe.enable_model_cpu_offload()
|
19 |
#torch.cuda.max_memory_allocated(device=device)
|
20 |
#refiner = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", use_safetensors=True, torch_dtype=torch.float16, variant="fp16").to(device)
|
21 |
#refiner.enable_xformers_memory_efficient_attention()
|