daquanzhou
merge github repos and lfs track ckpt/path/safetensors/pt
613c9ab
raw
history blame
9.24 kB
import comfy.sample as comfy_sample
from .sampling import motion_sample_factory
from .nodes_gen1 import (AnimateDiffLoaderGen1, LegacyAnimateDiffLoaderWithContext, AnimateDiffModelSettings,
AnimateDiffModelSettingsSimple, AnimateDiffModelSettingsAdvanced, AnimateDiffModelSettingsAdvancedAttnStrengths)
from .nodes_gen2 import UseEvolvedSamplingNode, ApplyAnimateDiffModelNode, ApplyAnimateDiffModelBasicNode, LoadAnimateDiffModelNode, ADKeyframeNode
from .nodes_multival import MultivalDynamicNode, MultivalScaledMaskNode
from .nodes_sample import (FreeInitOptionsNode, NoiseLayerAddWeightedNode, SampleSettingsNode, NoiseLayerAddNode, NoiseLayerReplaceNode, IterationOptionsNode,
CustomCFGNode, CustomCFGKeyframeNode)
from .nodes_sigma_schedule import (SigmaScheduleNode, RawSigmaScheduleNode, WeightedAverageSigmaScheduleNode, InterpolatedWeightedAverageSigmaScheduleNode, SplitAndCombineSigmaScheduleNode)
from .nodes_context import (LegacyLoopedUniformContextOptionsNode, LoopedUniformContextOptionsNode, LoopedUniformViewOptionsNode, StandardUniformContextOptionsNode, StandardStaticContextOptionsNode, BatchedContextOptionsNode,
StandardStaticViewOptionsNode, StandardUniformViewOptionsNode, ViewAsContextOptionsNode)
from .nodes_ad_settings import AnimateDiffSettingsNode, ManualAdjustPENode, SweetspotStretchPENode, FullStretchPENode
from .nodes_extras import AnimateDiffUnload, EmptyLatentImageLarge, CheckpointLoaderSimpleWithNoiseSelect
from .nodes_deprecated import AnimateDiffLoader_Deprecated, AnimateDiffLoaderAdvanced_Deprecated, AnimateDiffCombine_Deprecated
from .nodes_lora import AnimateDiffLoraLoader, MaskedLoraLoader
from .logger import logger
# override comfy_sample.sample with animatediff-support version
comfy_sample.sample = motion_sample_factory(comfy_sample.sample)
comfy_sample.sample_custom = motion_sample_factory(comfy_sample.sample_custom, is_custom=True)
NODE_CLASS_MAPPINGS = {
# Unencapsulated
"ADE_AnimateDiffLoRALoader": AnimateDiffLoraLoader,
"ADE_AnimateDiffSamplingSettings": SampleSettingsNode,
"ADE_AnimateDiffKeyframe": ADKeyframeNode,
# Multival Nodes
"ADE_MultivalDynamic": MultivalDynamicNode,
"ADE_MultivalScaledMask": MultivalScaledMaskNode,
# Context Opts
"ADE_StandardStaticContextOptions": StandardStaticContextOptionsNode,
"ADE_StandardUniformContextOptions": StandardUniformContextOptionsNode,
"ADE_LoopedUniformContextOptions": LoopedUniformContextOptionsNode,
"ADE_ViewsOnlyContextOptions": ViewAsContextOptionsNode,
"ADE_BatchedContextOptions": BatchedContextOptionsNode,
"ADE_AnimateDiffUniformContextOptions": LegacyLoopedUniformContextOptionsNode, # Legacy
# View Opts
"ADE_StandardStaticViewOptions": StandardStaticViewOptionsNode,
"ADE_StandardUniformViewOptions": StandardUniformViewOptionsNode,
"ADE_LoopedUniformViewOptions": LoopedUniformViewOptionsNode,
# Iteration Opts
"ADE_IterationOptsDefault": IterationOptionsNode,
"ADE_IterationOptsFreeInit": FreeInitOptionsNode,
# Noise Layer Nodes
"ADE_NoiseLayerAdd": NoiseLayerAddNode,
"ADE_NoiseLayerAddWeighted": NoiseLayerAddWeightedNode,
"ADE_NoiseLayerReplace": NoiseLayerReplaceNode,
# AnimateDiff Settings
"ADE_AnimateDiffSettings": AnimateDiffSettingsNode,
"ADE_AdjustPESweetspotStretch": SweetspotStretchPENode,
"ADE_AdjustPEFullStretch": FullStretchPENode,
"ADE_AdjustPEManual": ManualAdjustPENode,
# Sample Settings
"ADE_CustomCFG": CustomCFGNode,
"ADE_CustomCFGKeyframe": CustomCFGKeyframeNode,
"ADE_SigmaSchedule": SigmaScheduleNode,
"ADE_RawSigmaSchedule": RawSigmaScheduleNode,
"ADE_SigmaScheduleWeightedAverage": WeightedAverageSigmaScheduleNode,
"ADE_SigmaScheduleWeightedAverageInterp": InterpolatedWeightedAverageSigmaScheduleNode,
"ADE_SigmaScheduleSplitAndCombine": SplitAndCombineSigmaScheduleNode,
# Extras Nodes
"ADE_AnimateDiffUnload": AnimateDiffUnload,
"ADE_EmptyLatentImageLarge": EmptyLatentImageLarge,
"CheckpointLoaderSimpleWithNoiseSelect": CheckpointLoaderSimpleWithNoiseSelect,
# Gen1 Nodes
"ADE_AnimateDiffLoaderGen1": AnimateDiffLoaderGen1,
"ADE_AnimateDiffLoaderWithContext": LegacyAnimateDiffLoaderWithContext,
"ADE_AnimateDiffModelSettings_Release": AnimateDiffModelSettings,
"ADE_AnimateDiffModelSettingsSimple": AnimateDiffModelSettingsSimple,
"ADE_AnimateDiffModelSettings": AnimateDiffModelSettingsAdvanced,
"ADE_AnimateDiffModelSettingsAdvancedAttnStrengths": AnimateDiffModelSettingsAdvancedAttnStrengths,
# Gen2 Nodes
"ADE_UseEvolvedSampling": UseEvolvedSamplingNode,
"ADE_ApplyAnimateDiffModelSimple": ApplyAnimateDiffModelBasicNode,
"ADE_ApplyAnimateDiffModel": ApplyAnimateDiffModelNode,
"ADE_LoadAnimateDiffModel": LoadAnimateDiffModelNode,
# MaskedLoraLoader
#"ADE_MaskedLoadLora": MaskedLoraLoader,
# Deprecated Nodes
"AnimateDiffLoaderV1": AnimateDiffLoader_Deprecated,
"ADE_AnimateDiffLoaderV1Advanced": AnimateDiffLoaderAdvanced_Deprecated,
"ADE_AnimateDiffCombine": AnimateDiffCombine_Deprecated,
}
NODE_DISPLAY_NAME_MAPPINGS = {
# Unencapsulated
"ADE_AnimateDiffLoRALoader": "Load AnimateDiff LoRA πŸŽ­πŸ…πŸ…“",
"ADE_AnimateDiffSamplingSettings": "Sample Settings πŸŽ­πŸ…πŸ…“",
"ADE_AnimateDiffKeyframe": "AnimateDiff Keyframe πŸŽ­πŸ…πŸ…“",
# Multival Nodes
"ADE_MultivalDynamic": "Multival Dynamic πŸŽ­πŸ…πŸ…“",
"ADE_MultivalScaledMask": "Multival Scaled Mask πŸŽ­πŸ…πŸ…“",
# Context Opts
"ADE_StandardStaticContextOptions": "Context Optionsβ—†Standard Static πŸŽ­πŸ…πŸ…“",
"ADE_StandardUniformContextOptions": "Context Optionsβ—†Standard Uniform πŸŽ­πŸ…πŸ…“",
"ADE_LoopedUniformContextOptions": "Context Optionsβ—†Looped Uniform πŸŽ­πŸ…πŸ…“",
"ADE_ViewsOnlyContextOptions": "Context Optionsβ—†Views Only [VRAMβ‡ˆ] πŸŽ­πŸ…πŸ…“",
"ADE_BatchedContextOptions": "Context Optionsβ—†Batched [Non-AD] πŸŽ­πŸ…πŸ…“",
"ADE_AnimateDiffUniformContextOptions": "Context Optionsβ—†Looped Uniform πŸŽ­πŸ…πŸ…“", # Legacy
# View Opts
"ADE_StandardStaticViewOptions": "View Optionsβ—†Standard Static πŸŽ­πŸ…πŸ…“",
"ADE_StandardUniformViewOptions": "View Optionsβ—†Standard Uniform πŸŽ­πŸ…πŸ…“",
"ADE_LoopedUniformViewOptions": "View Optionsβ—†Looped Uniform πŸŽ­πŸ…πŸ…“",
# Iteration Opts
"ADE_IterationOptsDefault": "Default Iteration Options πŸŽ­πŸ…πŸ…“",
"ADE_IterationOptsFreeInit": "FreeInit Iteration Options πŸŽ­πŸ…πŸ…“",
# Noise Layer Nodes
"ADE_NoiseLayerAdd": "Noise Layer [Add] πŸŽ­πŸ…πŸ…“",
"ADE_NoiseLayerAddWeighted": "Noise Layer [Add Weighted] πŸŽ­πŸ…πŸ…“",
"ADE_NoiseLayerReplace": "Noise Layer [Replace] πŸŽ­πŸ…πŸ…“",
# AnimateDiff Settings
"ADE_AnimateDiffSettings": "AnimateDiff Settings πŸŽ­πŸ…πŸ…“",
"ADE_AdjustPESweetspotStretch": "Adjust PE [Sweetspot Stretch] πŸŽ­πŸ…πŸ…“",
"ADE_AdjustPEFullStretch": "Adjust PE [Full Stretch] πŸŽ­πŸ…πŸ…“",
"ADE_AdjustPEManual": "Adjust PE [Manual] πŸŽ­πŸ…πŸ…“",
# Sample Settings
"ADE_CustomCFG": "Custom CFG πŸŽ­πŸ…πŸ…“",
"ADE_CustomCFGKeyframe": "Custom CFG Keyframe πŸŽ­πŸ…πŸ…“",
"ADE_SigmaSchedule": "Create Sigma Schedule πŸŽ­πŸ…πŸ…“",
"ADE_RawSigmaSchedule": "Create Raw Sigma Schedule πŸŽ­πŸ…πŸ…“",
"ADE_SigmaScheduleWeightedAverage": "Sigma Schedule Weighted Mean πŸŽ­πŸ…πŸ…“",
"ADE_SigmaScheduleWeightedAverageInterp": "Sigma Schedule Interpolated Mean πŸŽ­πŸ…πŸ…“",
"ADE_SigmaScheduleSplitAndCombine": "Sigma Schedule Split Combine πŸŽ­πŸ…πŸ…“",
# Extras Nodes
"ADE_AnimateDiffUnload": "AnimateDiff Unload πŸŽ­πŸ…πŸ…“",
"ADE_EmptyLatentImageLarge": "Empty Latent Image (Big Batch) πŸŽ­πŸ…πŸ…“",
"CheckpointLoaderSimpleWithNoiseSelect": "Load Checkpoint w/ Noise Select πŸŽ­πŸ…πŸ…“",
# Gen1 Nodes
"ADE_AnimateDiffLoaderGen1": "AnimateDiff Loader πŸŽ­πŸ…πŸ…“β‘ ",
"ADE_AnimateDiffLoaderWithContext": "AnimateDiff Loader [Legacy] πŸŽ­πŸ…πŸ…“β‘ ",
"ADE_AnimateDiffModelSettings_Release": "[DEPR] Motion Model Settings πŸŽ­πŸ…πŸ…“β‘ ",
"ADE_AnimateDiffModelSettingsSimple": "[DEPR] Motion Model Settings (Simple) πŸŽ­πŸ…πŸ…“β‘ ",
"ADE_AnimateDiffModelSettings": "[DEPR] Motion Model Settings (Advanced) πŸŽ­πŸ…πŸ…“β‘ ",
"ADE_AnimateDiffModelSettingsAdvancedAttnStrengths": "[DEPR] Motion Model Settings (Adv. Attn) πŸŽ­πŸ…πŸ…“β‘ ",
# Gen2 Nodes
"ADE_UseEvolvedSampling": "Use Evolved Sampling πŸŽ­πŸ…πŸ…“β‘‘",
"ADE_ApplyAnimateDiffModelSimple": "Apply AnimateDiff Model πŸŽ­πŸ…πŸ…“β‘‘",
"ADE_ApplyAnimateDiffModel": "Apply AnimateDiff Model (Adv.) πŸŽ­πŸ…πŸ…“β‘‘",
"ADE_LoadAnimateDiffModel": "Load AnimateDiff Model πŸŽ­πŸ…πŸ…“β‘‘",
# MaskedLoraLoader
#"ADE_MaskedLoadLora": "Load LoRA (Masked) πŸŽ­πŸ…πŸ…“",
# Deprecated Nodes
"AnimateDiffLoaderV1": "AnimateDiff Loader [DEPRECATED] πŸŽ­πŸ…πŸ…“",
"ADE_AnimateDiffLoaderV1Advanced": "AnimateDiff Loader (Advanced) [DEPRECATED] πŸŽ­πŸ…πŸ…“",
"ADE_AnimateDiffCombine": "AnimateDiff Combine [DEPRECATED, Use Video Combine (VHS) Instead!] πŸŽ­πŸ…πŸ…“",
}