Experiment: Arbitrary extra parameters to NODE

This is extremely cursed, but you can do prompt scheduling with video models using this.

For example:

NODE(UC_AdvancedMiniMaxH3ImageToVideo, prompt, vae 161:152 0; reference_images.reference_image_1 [114:201:0.3] 0; width 120 0; height 120 1; length 176 1)

This changes the reference image parameter mid-sampling.

Syntax for the last parameter is a ;-separated list of paramname node_id output_slot tuples. The given slot from the node will then be plugged in as the named parameter)

Export your workflow in API format to find the node IDs.

This will probably change later.
This commit is contained in:
asagi4
2026-08-08 00:08:39 +03:00
parent ea7a61a52b
commit ebc53ae6e9
+10 -4
View File
@@ -197,14 +197,20 @@ def build_scheduled_prompts(graph, schedules, clip):
start_pct = 0.0
for end_pct, c in schedules:
p = c["prompt"]
p, classnames = get_function(p, "NODE", ["PCTextEncode", "text"])
p, classnames = get_function(p, "NODE", ["PCTextEncode", "text", ""])
classname = "PCTextEncode"
paramname = "text"
magic_spec = ""
if classnames:
classname, paramname = classnames[0].args
node = graph.node(classname)
classname, paramname, magic_spec = classnames[0].args
node = graph.node(classname.strip())
node.set_input("clip", clip)
node.set_input(paramname, p)
node.set_input(paramname.strip(), p)
extra_inputs = magic_spec.split(";")
for e in extra_inputs:
a, b, c = e.split()
name, node_id, out_slot = a.strip(), b.strip(), int(c.strip())
node.set_input(name, [node_id, out_slot])
timestep = graph.node("ConditioningSetTimestepRange")
timestep.set_input("conditioning", node.out(0))
timestep.set_input("start", start_pct)