Value Scheduling [Latents] ๐ŸŽญ๐Ÿ…๐Ÿ…“

ADE_ValueSchedulingLatents

<div><div id=VHS_shortdesc style="font-size: .8em">Create a list of values with automatic interpolation, its length matching passed-in latent count.</div></div><div><div vhs_title="Format" style="display: flex; font-size: 0.8em" class="VHS_collapse"><div style="color: #AAA; height: 1.5em;">[<span style="font-family: monospace">-</span>]</div><div style="width: 100%">Format: <div>Scheduling supports two formats: JSON and pythonic.</div><div><div vhs_title="JSON" style="display: flex; font-size: 0.8em" class="VHS_collapse"><div style="color: #AAA; height: 1.5em;">[<span style="font-family: monospace">-</span>]</div><div style="width: 100%">JSON: <div>"idx": float/int_value, ...</div></div></div><div vhs_title="pythonic" style="display: flex; font-size: 0.8em" class="VHS_collapse"><div style="color: #AAA; height: 1.5em;">[<span style="font-family: monospace">-</span>]</div><div style="width: 100%">pythonic: <div>idx = float/int_value, ...</div></div></div></div><div>The idx is the index of the frame - first frame is 0, last frame is max_frames-1. An idx may be the following:</div><div><div vhs_title="allowed idxs" style="display: flex; font-size: 0.8em" class="VHS_collapse"><div style="color: #AAA; height: 1.5em;">[<span style="font-family: monospace">-</span>]</div><div style="width: 100%">allowed idxs: <div vhs_title="single" style="display: flex; font-size: 1em" class="VHS_collapse"><div style="color: #AAA; height: 1.5em;">[<span style="font-family: monospace">-</span>]</div><div style="width: 100%">single: A positive integer (e.g. 0, 2) schedules value for frame. A negative integer (e.g. -1, -5) schedules value for frame from the end (-1 would be the last frame). A decimal (e.g. 0.5, 1.0) selects frame based relative location in whole schedule (0.5 would be halfway, 1.0 would be last frame).</div></div><div vhs_title="range" style="display: flex; font-size: 1em" class="VHS_collapse"><div style="color: #AAA; height: 1.5em;">[<span style="font-family: monospace">-</span>]</div><div style="width: 100%">range: Using rules above, single:single chooses uninterpolated prompts from start idx (included) to end idx (excluded). Examples -> 0:12, 0:-5, 2:0.5</div></div><div vhs_title="hold" style="display: flex; font-size: 1em" class="VHS_collapse"><div style="color: #AAA; height: 1.5em;">[<span style="font-family: monospace">-</span>]</div><div style="width: 100%">hold: Putting a colon after a single idx stops interpolation until the next provided index. Examples -> 0:, 0.5:, 16: </div></div></div></div></div><div>The values can be written without any special formatting.</div><div><div vhs_title="JSON" style="display: flex; font-size: 0.8em" class="VHS_collapse"><div style="color: #AAA; height: 1.5em;">[<span style="font-family: monospace">-</span>]</div><div style="width: 100%">JSON: <div>"0": 1.0,</div><div>"16": 1.3</div></div></div><div vhs_title="pythonic" style="display: flex; font-size: 0.8em" class="VHS_collapse"><div style="color: #AAA; height: 1.5em;">[<span style="font-family: monospace">-</span>]</div><div style="width: 100%">pythonic: <div>0 = 1.0,</div><div>16 = 1.3</div></div></div></div></div></div></div><div><div vhs_title="Inputs" style="display: flex; font-size: 0.8em" class="VHS_collapse VHS_precollapse"><div style="color: #AAA; height: 1.5em;">[<span style="font-family: monospace">-</span>]</div><div style="width: 100%">Inputs: <div vhs_title="values" style="display: flex; font-size: 0.8em" class="VHS_collapse VHS_precollapse"><div style="color: #AAA; height: 1.5em;">[<span style="font-family: monospace">-</span>]</div><div style="width: 100%">values: Write your values here.</div></div><div vhs_title="latent" style="display: flex; font-size: 0.8em" class="VHS_collapse"><div style="color: #AAA; height: 1.5em;">[<span style="font-family: monospace">-</span>]</div><div style="width: 100%">latent: Used to get the amount of frames (max_length) to use for scheduling.</div></div><div vhs_title="print_schedule" style="display: flex; font-size: 0.8em" class="VHS_collapse"><div style="color: #AAA; height: 1.5em;">[<span style="font-family: monospace">-</span>]</div><div style="width: 100%">print_schedule: When True, prints output values for each frame.</div></div></div></div></div>

Pack: AnimateDiff Evolved

custom_nodes.ComfyUI-AnimateDiff-Evolved

Inputs (3)

NameTypeRequired
valuesSTRINGrequired
latentLATENTrequired
print_scheduleBOOLEANoptional

Outputs (4)

NameType
FLOATFLOAT
FLOATSFLOATS
INTINT
INTSINTS