Eyalgut commited on
Commit
fd7054f
·
verified ·
1 Parent(s): 5cc5619

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -13,11 +13,15 @@ resolutions = ["1024 1024","1280 768","1344 768","768 1344","768 1280" ]
13
 
14
  # Load pipeline
15
 
 
16
  unet = UNet2DConditionModel.from_pretrained("briaai/BRIA-2.2-FAST", torch_dtype=torch.float16)
17
- pipe = DiffusionPipeline.from_pretrained("briaai/BRIA-2.2", unet=unet, torch_dtype=torch.float16)
18
- del unet
19
  pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
20
- pipe = pipe.to("cuda")
 
 
 
 
21
  pipe.force_zeros_for_empty_prompt = False
22
 
23
  print("Optimizing BRIA 2.2 FAST - this could take a while")
 
13
 
14
  # Load pipeline
15
 
16
+ vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
17
  unet = UNet2DConditionModel.from_pretrained("briaai/BRIA-2.2-FAST", torch_dtype=torch.float16)
18
+ pipe = DiffusionPipeline.from_pretrained("briaai/BRIA-2.2", torch_dtype=torch.float16, unet=unet, vae=vae)
 
19
  pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
20
+ pipe.to('cuda')
21
+ del unet
22
+ del vae
23
+
24
+
25
  pipe.force_zeros_for_empty_prompt = False
26
 
27
  print("Optimizing BRIA 2.2 FAST - this could take a while")