Nodes/YuE2-ComfyUI/YuE2 Select Plan
ComfyUI Node

YuE2 Select Plan

Pick a take without re-writing the whole batch

By pytraveler·Created a day ago·Updated about 22 hours ago· 0
YuE2 Select Plan
  • plans
  • plan
  • score_abc
index0

YuE2 Select Plan takes one score out of a batch and hands it on. That's it - it's the smallest node in the pack, and it exists for one reason that's easy to miss until you've wasted ten minutes on it.

If the take index lived on YuE2 Plan Batch, changing it would dirty that node and re-plan every score in the set. Four songs' worth of planning to hear take two, then again for take three. Putting the choice in a node downstream keeps the batch node's output unchanged, so ComfyUI doesn't re-run it. Clicking through takes costs only the singing. That's the design, and it's the whole reason this node isn't a widget.

Inputs and outputs

  • plans - the batch handle from YuE2 Plan Batch's plans output. Required. There's no tooltip beyond that, and nothing to configure.
  • index - which take to take, counting from 0, so 0 to 7, since a batch tops out at 8. The author's note is the one you want: an index past the end is clamped to the last take rather than stopping the run. There's a warning on the node when that happens, but the run continues - so if index: 5 on a three-take batch hands you something that sounds like take 2, that's not a bug, you asked for nothing and got the last one.

Outputs come in the pair the rest of the staged nodes use: plan, the YUE2_PLAN handle that YuE2 Render Plan wants, and score_abc, the selected take's ABC notation as text, so you can read it, paste it somewhere, or edit it and hand the edit to the render node's score box.

Where it fits

The chain is YuE2 Plan BatchYuE2 Select PlanYuE2 Render Plan, and the pack's "Four scores, one song" template wires exactly that up. You don't need YuE2 Plan in front of it - the batch node already runs the score stage, with the same style, lyrics, seed and options inputs.

Concretely: batch writes scores for seeds 831001–831004, the selector points at one, the render node sings it into a 48 kHz stereo waveform and hands out latents too. Selector moved to index 2, press run, and only the render re-executes. That's the loop you want for auditioning takes - cheap planning once, singing once per audition.

Install

Nothing to it, same pack:

cd ComfyUI/custom_nodes
git clone https://github.com/pytraveler/YuE2-ComfyUI

Restart ComfyUI and find it under YuE2/Advanced. tiktoken is the only added requirement, and the 7.26 GB model downloads on first run into models/checkpoints/.

Where it goes wrong

The realistic mistake is wiring YuE2 Plan's output into plans and wondering why the index does nothing useful - the batch type and the single-plan type are different sockets, and only the batch node produces the one this wants.

The other thing to know is that this node is a selector, not a cache. If you edit style or lyrics on the batch node, everything upstream re-runs and you get a fresh set of takes from the same four seeds - the old scores are gone. That's correct behaviour, and it's why the selector is where you iterate and the batch node is where you decide. Get the words and the style right first; then pick second.

CategoryYuE2/Advanced

Inputs (2)

NameTypeDefaultDescription
plansYUE2_PLANSThe batch of scores from 'YuE2 Plan Batch'.
indexINT00–7Which score to take, counting from 0. Changing this number does not rewrite the scores: the batch above is already done, so moving through them costs nothing. An index past the end is clamped to the last one rather than stopping the run.

Outputs (2)

NameTypeDescription
planYUE2_PLAN
score_abcSTRING