profaker commited on
Commit
40fcb9d
1 Parent(s): 0802715

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -6,6 +6,8 @@ from diffusers.models import AutoencoderKL
6
  from diffusers import AutoPipelineForInpainting, UNet2DConditionModel
7
  import diffusers
8
  from share_btn import community_icon_html, loading_icon_html, share_js
 
 
9
 
10
  unet = UNet2DConditionModel.from_config("SG161222/Realistic_Vision_V5.0_noVAE", subfolder="unet").to("cuda", torch.float16)
11
  unet.load_state_dict(load_file(hf_hub_download("ByteDance/SDXL-Lightning", "sdxl_lightning_2step_unet.safetensors"), device="cuda"))
 
6
  from diffusers import AutoPipelineForInpainting, UNet2DConditionModel
7
  import diffusers
8
  from share_btn import community_icon_html, loading_icon_html, share_js
9
+ from safetensors.torch import load_file
10
+ from huggingface_hub import hf_hub_download
11
 
12
  unet = UNet2DConditionModel.from_config("SG161222/Realistic_Vision_V5.0_noVAE", subfolder="unet").to("cuda", torch.float16)
13
  unet.load_state_dict(load_file(hf_hub_download("ByteDance/SDXL-Lightning", "sdxl_lightning_2step_unet.safetensors"), device="cuda"))