MCPcopy Create free account
hub / github.com/Kosinkadink/ComfyUI-Advanced-ControlNet / LatentKeyframeNode

Class LatentKeyframeNode

adv_control/nodes_keyframes.py:197–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195 io.Float.Input('strength', default=1.0, max=10.0, min=0.0, step=0.001),
196 io.Custom('LATENT_KEYFRAME').Input('prev_latent_kf', optional=True)
197 ],
198 outputs=[
199 io.Custom('LATENT_KEYFRAME').Output('LATENT_KF', is_output_list=False)
200 ]
201 )
202
203 @classmethod
204 def execute(cls,
205 batch_index: int,
206 strength: float,
207 prev_latent_kf: LatentKeyframeGroup=None,
208 prev_latent_keyframe: LatentKeyframeGroup=None, # old name
209 ):
210 prev_latent_keyframe = prev_latent_keyframe if prev_latent_keyframe else prev_latent_kf
211 if not prev_latent_keyframe:
212 prev_latent_keyframe = LatentKeyframeGroup()
213 else:
214 prev_latent_keyframe = prev_latent_keyframe.clone()
215 keyframe = LatentKeyframe(batch_index, strength)
216 prev_latent_keyframe.add(keyframe)
217 return io.NodeOutput(prev_latent_keyframe,)
218
219class LatentKeyframeGroupNode(io.ComfyNode):
220 @classmethod
221 def define_schema(cls) -> io.Schema:
222 return io.Schema(
223 node_id='LatentKeyframeGroup',
224 display_name='Latent Keyframe Group 🛂🅐🅒🅝',
225 category='Adv-ControlNet 🛂🅐🅒🅝/keyframes',
226 inputs=[
227 io.String.Input('index_strengths', default='', multiline=True),
228 io.Custom('LATENT_KEYFRAME').Input('prev_latent_kf', optional=True),
229 io.Latent.Input('latent_optional', display_name='latent', optional=True),
230 io.Boolean.Input('print_keyframes', optional=True, default=False)
231 ],
232 outputs=[
233 io.Custom('LATENT_KEYFRAME').Output('LATENT_KF', is_output_list=False)
234 ]
235 )

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected