profaker commited on
Commit
277335c
·
verified ·
1 Parent(s): d4fbc7d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -13,6 +13,7 @@ unet = UNet2DConditionModel.from_config("SG161222/Realistic_Vision_V5.0_noVAE",
13
  unet.load_state_dict(load_file(hf_hub_download("ByteDance/SDXL-Lightning", "sdxl_lightning_2step_unet.safetensors"), device="cuda"))
14
  vae = AutoencoderKL.from_pretrained("stabilityai/sd-vae-ft-mse")
15
  pipe = AutoPipelineForInpainting.from_pretrained("SG161222/Realistic_Vision_V5.0_noVAE",unet=unet,vae=vae).to("cuda")
 
16
 
17
  def read_content(file_path: str) -> str:
18
  """read the content of target file
 
13
  unet.load_state_dict(load_file(hf_hub_download("ByteDance/SDXL-Lightning", "sdxl_lightning_2step_unet.safetensors"), device="cuda"))
14
  vae = AutoencoderKL.from_pretrained("stabilityai/sd-vae-ft-mse")
15
  pipe = AutoPipelineForInpainting.from_pretrained("SG161222/Realistic_Vision_V5.0_noVAE",unet=unet,vae=vae).to("cuda")
16
+ unet = unet.to(dtype=torch.float16)
17
 
18
  def read_content(file_path: str) -> str:
19
  """read the content of target file