re upload hf models

This commit is contained in:
songkey-win
2024-12-20 18:11:29 +08:00
parent 4cf28f8d2b
commit a9a630e3de
2 changed files with 9 additions and 8 deletions
+7 -6
View File
@@ -42,13 +42,14 @@ def get_torch_device(gpu_id=-1):
def load_face_toolkits(dtype=torch.float16, gpu_id=-1, modelscope=False):
if modelscope:
from modelscope import snapshot_download
pd_fpg_motion = FanEncoder.from_pretrained(snapshot_download('songkey/pd_fgc_motion'))
image_encoder = CLIPVisionModelWithProjection.from_pretrained(
snapshot_download('songkey/IP-Adapter'), subfolder='models/image_encoder')
pd_fpg_dir = snapshot_download('songkey/pd_fgc_motion')
clip_image_dir = snapshot_download('songkey/IP-Adapter')
else:
pd_fpg_motion = FanEncoder.from_pretrained("songkey/pd_fgc_motion")
image_encoder = CLIPVisionModelWithProjection.from_pretrained(
'h94/IP-Adapter', subfolder='models/image_encoder')
pd_fpg_dir = 'songkey/pd_fgc_motion'
clip_image_dir = 'songkey/IP-Adapter'
pd_fpg_motion = FanEncoder.from_pretrained(pd_fpg_dir)
image_encoder = CLIPVisionModelWithProjection.from_pretrained(clip_image_dir, subfolder='models/image_encoder')
image_encoder.to(dtype=dtype).cpu()
pd_fpg_motion.to(dtype=dtype).cpu()
+2 -2
View File
@@ -79,7 +79,7 @@ class HMImagePipelineLoader:
CATEGORY = "hellomeme"
def load_pipeline(self, checkpoint=None, lora=None, vae=None, version='v2', stylize='x1', deployment='huggingface'):
dtype = torch.float16
pipeline = HMImagePipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5")
pipeline = HMImagePipeline.from_pretrained("songkey/stable-diffusion-v1-5")
pipeline.to(dtype=dtype)
pipeline.caryomitosis(version=version, modelscope=deployment=='modelscope')
@@ -130,7 +130,7 @@ class HMVideoPipelineLoader:
def load_pipeline(self, checkpoint=None, lora=None, vae=None, version='v2', stylize='x1', deployment='huggingface'):
dtype = torch.float16
pipeline = HMVideoPipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5")
pipeline = HMVideoPipeline.from_pretrained("songkey/stable-diffusion-v1-5")
pipeline.to(dtype=dtype)
pipeline.caryomitosis(version=version, modelscope=deployment=='modelscope')