Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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,
|
18 |
-
del unet
|
19 |
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
|
20 |
-
pipe
|
|
|
|
|
|
|
|
|
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")
|