From 93471cc59b65dabaee64570cc49536dcd8a11d05 Mon Sep 17 00:00:00 2001 From: hugoycj <576550489@qq.com> Date: Fri, 9 Aug 2024 17:56:30 +0800 Subject: [PATCH] fix: Update empty_text_embed path --- hubconf.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hubconf.py b/hubconf.py index 84d0665..ab47bc6 100644 --- a/hubconf.py +++ b/hubconf.py @@ -126,8 +126,9 @@ def load_model(repo_id, unet_subfolder, device="cuda", local_dir=None): vae.load_state_dict(load_ckpt_vae) # Load empty text embed - empty_text_embed = torch.from_numpy(np.load('empty_text_embed.npy')).to(device, torch.float32)[None] - + empty_text_embed = torch.from_numpy(np.load(os.path.join(os.path.dirname(os.path.abspath(__file__)), + 'empty_text_embed.npy'))).to(device, torch.float32)[None] + genpercept_params_ckpt = dict( unet=unet, vae=vae,