Added legacy paths
This commit is contained in:
1 parent
c3bc8b0b4e
commit
702254688d
45 files changed
+840
-223
No files matched your search
@@ -1,4 +1,5 @@
|
||||
# WIP, coming soon ish
|
||||
from toolkit.models.v2.vision_encoders.clip_vision import CLIPVisionEncoder
|
||||
from functools import partial
|
||||
import torch
|
||||
import yaml
|
||||
@@ -314,10 +315,8 @@ class Wan21I2V(Wan21):
|
||||
self.model_config.extras_name_or_path ,
|
||||
subfolder="image_processor"
|
||||
)
|
||||
self.image_encoder = CLIPVisionModel.from_pretrained(
|
||||
self.model_config.extras_name_or_path,
|
||||
subfolder="image_encoder",
|
||||
torch_dtype=dtype,
|
||||
self.image_encoder = CLIPVisionEncoder.load_model(
|
||||
self.model_config.extras_name_or_path, dtype=dtype
|
||||
)
|
||||
except Exception as e:
|
||||
# load from name_or_path
|
||||
@@ -325,10 +324,8 @@ class Wan21I2V(Wan21):
|
||||
self.model_config.name_or_path_original,
|
||||
subfolder="image_processor"
|
||||
)
|
||||
self.image_encoder = CLIPVisionModel.from_pretrained(
|
||||
self.model_config.name_or_path_original,
|
||||
subfolder="image_encoder",
|
||||
torch_dtype=dtype,
|
||||
self.image_encoder = CLIPVisionEncoder.load_model(
|
||||
self.model_config.name_or_path_original, dtype=dtype
|
||||
)
|
||||
self.image_encoder.to(self.device_torch, dtype=dtype)
|
||||
self.image_encoder.eval()
|
||||
|
||||
Reference in new issue
Block a user