ysharma HF staff commited on
Commit
ce70a4b
1 Parent(s): c3f2272

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -11,6 +11,8 @@ pipeline = StableDiffusionXLPipeline.from_pretrained(
11
  "stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True,
12
  scheduler=scheduler
13
  ).to("cuda")
 
 
14
 
15
  handler = sa_handler.Handler(pipeline)
16
  sa_args = sa_handler.StyleAlignedArgs(share_group_norm=False,
 
11
  "stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True,
12
  scheduler=scheduler
13
  ).to("cuda")
14
+ pipeline.enable_sequential_cpu_offload()
15
+ pipeline.enable_vae_slicing()
16
 
17
  handler = sa_handler.Handler(pipeline)
18
  sa_args = sa_handler.StyleAlignedArgs(share_group_norm=False,