Rename/move
This commit is contained in:
+2
-2
@@ -9,8 +9,8 @@ import comfy.supported_models_base
|
|||||||
import comfy.supported_models
|
import comfy.supported_models
|
||||||
import comfy.latent_formats
|
import comfy.latent_formats
|
||||||
|
|
||||||
from .model.pixart import PixArt
|
from .models.pixart import PixArt
|
||||||
from .model.pixartms import PixArtMS
|
from .models.pixartms import PixArtMS
|
||||||
from .diffusers_convert import convert_state_dict
|
from .diffusers_convert import convert_state_dict
|
||||||
from ..utils.loader import load_state_dict_from_config
|
from ..utils.loader import load_state_dict_from_config
|
||||||
from ..text_encoders.pixart.tenc import PixArtTokenizer, PixArtT5XXL
|
from ..text_encoders.pixart.tenc import PixArtTokenizer, PixArtT5XXL
|
||||||
|
|||||||
+1
-5
@@ -6,11 +6,7 @@ except ImportError:
|
|||||||
else:
|
else:
|
||||||
NODE_CLASS_MAPPINGS = {}
|
NODE_CLASS_MAPPINGS = {}
|
||||||
|
|
||||||
# All text encoders
|
# Generic/universal nodes
|
||||||
from .text_encoders.nodes import NODE_CLASS_MAPPINGS as Tenc_Nodes
|
|
||||||
NODE_CLASS_MAPPINGS.update(Tenc_Nodes)
|
|
||||||
|
|
||||||
# Generic nodes
|
|
||||||
from .nodes import NODE_CLASS_MAPPINGS as Base_Nodes
|
from .nodes import NODE_CLASS_MAPPINGS as Base_Nodes
|
||||||
NODE_CLASS_MAPPINGS.update(Base_Nodes)
|
NODE_CLASS_MAPPINGS.update(Base_Nodes)
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import comfy.utils
|
|||||||
|
|
||||||
from .PixArt.loader import load_pixart_state_dict
|
from .PixArt.loader import load_pixart_state_dict
|
||||||
from .Sana.loader import load_sana_state_dict
|
from .Sana.loader import load_sana_state_dict
|
||||||
|
from .text_encoders.tenc import load_text_encoder, tenc_names
|
||||||
|
|
||||||
loaders = {
|
loaders = {
|
||||||
"PixArt": load_pixart_state_dict,
|
"PixArt": load_pixart_state_dict,
|
||||||
@@ -31,6 +32,39 @@ class EXMUnetLoader:
|
|||||||
sd = comfy.utils.load_torch_file(unet_path)
|
sd = comfy.utils.load_torch_file(unet_path)
|
||||||
return (loader_fn(sd),)
|
return (loader_fn(sd),)
|
||||||
|
|
||||||
|
class EXMCLIPLoader:
|
||||||
|
@classmethod
|
||||||
|
def INPUT_TYPES(s):
|
||||||
|
files = []
|
||||||
|
files += folder_paths.get_filename_list("clip")
|
||||||
|
# if "clip_gguf" in folder_paths.folder_names_and_paths:
|
||||||
|
# files += folder_paths.get_filename_list("clip_gguf")
|
||||||
|
return {
|
||||||
|
"required": {
|
||||||
|
"clip_name": (files, ),
|
||||||
|
"type": (["PixArt", "MiaoBi", "Sana"],),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RETURN_TYPES = ("CLIP",)
|
||||||
|
FUNCTION = "load_clip"
|
||||||
|
CATEGORY = "ExtraModels"
|
||||||
|
TITLE = "CLIPLoader (ExtraModels)"
|
||||||
|
|
||||||
|
def load_clip(self, clip_name, type):
|
||||||
|
clip_path = folder_paths.get_full_path("clip", clip_name)
|
||||||
|
clip_type = tenc_names.get(type, None)
|
||||||
|
|
||||||
|
clip = load_text_encoder(
|
||||||
|
ckpt_paths =[clip_path],
|
||||||
|
embedding_directory = folder_paths.get_folder_paths("embeddings"),
|
||||||
|
clip_type = clip_type
|
||||||
|
)
|
||||||
|
return (clip,)
|
||||||
|
|
||||||
|
#class EXMResolutionSelect:
|
||||||
|
|
||||||
NODE_CLASS_MAPPINGS = {
|
NODE_CLASS_MAPPINGS = {
|
||||||
"EXMUnetLoader": EXMUnetLoader,
|
"EXMUnetLoader": EXMUnetLoader,
|
||||||
|
"EXMCLIPLoader": EXMCLIPLoader,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
import folder_paths
|
|
||||||
|
|
||||||
from .tenc import load_text_encoder, tenc_names
|
|
||||||
|
|
||||||
class EXMCLIPLoader:
|
|
||||||
@classmethod
|
|
||||||
def INPUT_TYPES(s):
|
|
||||||
files = []
|
|
||||||
files += folder_paths.get_filename_list("clip")
|
|
||||||
# if "clip_gguf" in folder_paths.folder_names_and_paths:
|
|
||||||
# files += folder_paths.get_filename_list("clip_gguf")
|
|
||||||
return {
|
|
||||||
"required": {
|
|
||||||
"clip_name": (files, ),
|
|
||||||
"type": (["PixArt", "MiaoBi", "Sana"],),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RETURN_TYPES = ("CLIP",)
|
|
||||||
FUNCTION = "load_clip"
|
|
||||||
CATEGORY = "ExtraModels"
|
|
||||||
TITLE = "CLIPLoader (ExtraModels)"
|
|
||||||
|
|
||||||
def load_clip(self, clip_name, type):
|
|
||||||
clip_path = folder_paths.get_full_path("clip", clip_name)
|
|
||||||
clip_type = tenc_names.get(type, None)
|
|
||||||
|
|
||||||
clip = load_text_encoder(
|
|
||||||
ckpt_paths =[clip_path],
|
|
||||||
embedding_directory = folder_paths.get_folder_paths("embeddings"),
|
|
||||||
clip_type = clip_type
|
|
||||||
)
|
|
||||||
return (clip,)
|
|
||||||
|
|
||||||
NODE_CLASS_MAPPINGS = {
|
|
||||||
"EXMCLIPLoader": EXMCLIPLoader,
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user