Skip to content

Commit

Permalink
LTXV model merging node.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Nov 27, 2024
1 parent 497db62 commit 0d4e29f
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions comfy_extras/nodes_model_merging_model_specific.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,28 @@ def INPUT_TYPES(s):

return {"required": arg_dict}

class ModelMergeLTXV(comfy_extras.nodes_model_merging.ModelMergeBlocks):
CATEGORY = "advanced/model_merging/model_specific"

@classmethod
def INPUT_TYPES(s):
arg_dict = { "model1": ("MODEL",),
"model2": ("MODEL",)}

argument = ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.01})

arg_dict["patchify_proj."] = argument
arg_dict["adaln_single."] = argument
arg_dict["caption_projection."] = argument

for i in range(28):
arg_dict["transformer_blocks.{}.".format(i)] = argument

arg_dict["scale_shift_table"] = argument
arg_dict["proj_out."] = argument

return {"required": arg_dict}

NODE_CLASS_MAPPINGS = {
"ModelMergeSD1": ModelMergeSD1,
"ModelMergeSD2": ModelMergeSD1, #SD1 and SD2 have the same blocks
Expand All @@ -183,4 +205,5 @@ def INPUT_TYPES(s):
"ModelMergeFlux1": ModelMergeFlux1,
"ModelMergeSD35_Large": ModelMergeSD35_Large,
"ModelMergeMochiPreview": ModelMergeMochiPreview,
"ModelMergeLTXV": ModelMergeLTXV,
}

0 comments on commit 0d4e29f

Please sign in to comment.