dgoot commited on
Commit
75ce7d0
Β·
verified Β·
1 Parent(s): ca260a2

Update app.py

Browse files

Load VAE in float16 mode

Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -46,11 +46,16 @@ download(
46
  "https://civitai.com/api/download/models/290640?type=VAE&format=SafeTensor",
47
  )
48
 
49
- vae = AutoencoderKL.from_single_file(vae_path)
 
 
 
50
 
51
  # pipe = StableDiffusionXLImg2ImgPipeline.from_single_file(
52
  pipe = StableDiffusionXLPipeline.from_single_file(
53
- model_path, torch_dtype=torch.float16, use_safetensors=True, variant="fp16", vae=vae
 
 
54
  )
55
  pipe = pipe.to("cuda")
56
 
 
46
  "https://civitai.com/api/download/models/290640?type=VAE&format=SafeTensor",
47
  )
48
 
49
+ vae = AutoencoderKL.from_single_file(
50
+ vae_path,
51
+ torch_dtype=torch.float16,
52
+ )
53
 
54
  # pipe = StableDiffusionXLImg2ImgPipeline.from_single_file(
55
  pipe = StableDiffusionXLPipeline.from_single_file(
56
+ model_path,
57
+ torch_dtype=torch.float16,
58
+ vae=vae,
59
  )
60
  pipe = pipe.to("cuda")
61