Update app.py
Browse files
app.py
CHANGED
@@ -64,14 +64,15 @@ checkpoint = "microsoft/Phi-3.5-mini-instruct"
|
|
64 |
#vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16")
|
65 |
#vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16")
|
66 |
#vaeXL = AutoencoderKL.from_pretrained("stabilityai/sdxl-vae", safety_checker=None, use_safetensors=False) #, device_map='cpu') #.to(torch.bfloat16) #.to(device=device, dtype=torch.bfloat16)
|
67 |
-
vaeSD3 = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16", subfolder='sd3-medium-vae', safety_checker=None) #, device_map='cpu') #.to(torch.bfloat16) #.to(device=device, dtype=torch.bfloat16)
|
68 |
|
69 |
pipe = StableDiffusion3Pipeline.from_pretrained("ford442/stable-diffusion-3.5-medium-bf16",
|
70 |
-
vae=None,
|
71 |
token=True
|
72 |
)
|
73 |
-
pipe.vae=vaeSD3
|
74 |
pipe.load_lora_weights('ford442/sdxl-vae-bf16', weight_name='LoRA/bm-goth_epoch_9.safetensors')
|
|
|
75 |
|
76 |
|
77 |
#pipe = StableDiffusion3Pipeline.from_pretrained("ford442/stable-diffusion-3.5-medium-bf16").to(torch.device("cuda:0"))
|
|
|
64 |
#vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16")
|
65 |
#vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16")
|
66 |
#vaeXL = AutoencoderKL.from_pretrained("stabilityai/sdxl-vae", safety_checker=None, use_safetensors=False) #, device_map='cpu') #.to(torch.bfloat16) #.to(device=device, dtype=torch.bfloat16)
|
67 |
+
#vaeSD3 = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16", subfolder='sd3-medium-vae', safety_checker=None) #, device_map='cpu') #.to(torch.bfloat16) #.to(device=device, dtype=torch.bfloat16)
|
68 |
|
69 |
pipe = StableDiffusion3Pipeline.from_pretrained("ford442/stable-diffusion-3.5-medium-bf16",
|
70 |
+
# vae=None,
|
71 |
token=True
|
72 |
)
|
73 |
+
#pipe.vae=vaeSD3
|
74 |
pipe.load_lora_weights('ford442/sdxl-vae-bf16', weight_name='LoRA/bm-goth_epoch_9.safetensors')
|
75 |
+
pipe.vae.to(torch.float32)
|
76 |
|
77 |
|
78 |
#pipe = StableDiffusion3Pipeline.from_pretrained("ford442/stable-diffusion-3.5-medium-bf16").to(torch.device("cuda:0"))
|