Manjushri commited on
Commit
6f2a1a3
1 Parent(s): 4529255

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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.bfloat16).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()
 
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()