STARFlow-V Text Encode
The prompt wrapper that decides 'video' vs 'image'
- text_encoder
- conditioning
Text encoders are usually the least interesting node in a workflow, and then one like this shows up and you realize the prompt is doing a lot more work than you thought. STARFlowVTextEncode doesn't just encode your text - it wraps it in STARFlow-V's exact prompt protocol, and that wrapper is how the model knows whether it's making a video at all.
The mechanism: prompt wrapping in three steps
Apple's reference pipeline (ported verbatim here, per the pack's docstring) rewrites your prompt in a fixed order before encoding:
- FPS wrap - if
fps > 0, your text becomesA video with 16 fps:\n{prompt}\n. Setfpsto0and it becomesAn image:\n{prompt}\ninstead - yes, this one node can encode an image prompt too. - Noise prepend -
Noise Level {int(noise_std*1000)}:\n..., so with the default0.5you getNoise Level 500:. The model conditions on how noisy the starting latent is. - Aspect append -
... in a 16:9 aspect ratio.\n.
Then the node encodes your prompt and an empty-string unconditional caption through the same wrapper, with the same fps/noise_std/aspect_ratio metadata, so the sampler has a proper CFG negative half. It even offloads the encoder back to CPU after encoding, which is a thoughtful touch on a 7B-video workflow.
The inputs
text_encoder- theSTARFLOW_V_TEXT_ENCODERfromSTARFlowVTextEncoderLoader.prompt- your text. Multiline, unlabeled style rules; describe the motion, the camera, the scene.fps- default16, matching the released profile (81 frames @ 16 FPS ≈ 5 seconds). This isn't cosmetic metadata; it's literally injected into the prompt string.noise_std- default0.5, the noise level the model conditions on.aspect_ratio- nine options:1:1,2:3,3:2,16:9,9:16,4:5,5:4,21:9,9:21. Pick the one that matches your sampler'swidth/height, or the conditioning and canvas disagree.
Output is conditioning (STARFLOW_V_CONDITIONING), which feeds STARFlowVSampler.
Installation
Shared pack install - same as every node in the suite:
cd ComfyUI/custom_nodes
git clone https://github.com/RyukoMatoiFan/ComfyUI-STARFlow
pip install -r ComfyUI-STARFlow/requirements.txt
# restart ComfyUI
The heavier setup is upstream: the STARFlowVTextEncoderLoader needs a full local FLAN-T5-XL directory, and that's covered in its own article.
Gotchas
The subtle one is aspect ratio drift. STARFlowVTextEncode bakes the ratio into the conditioning text, but the sampler takes its own width/height inputs - nothing validates they match. Run 16:9 in the encoder with 1:1 dimensions in the sampler and you'll get a video that's confused about what it should look like. Keep them in sync. Also remember fps is text, not a setting: crank it to 60 and the prompt says "a video with 60 fps" but the actual frame count still comes from num_frames in the sampler. Say the same thing in both places, or the model gets mixed signals.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| text_encoder | STARFLOW_V_TEXT_ENCODER | — | |
| prompt | STRING | — | |
| fps | INT | 161–60 | — |
| noise_std | FLOAT | 0.500–2 | — |
| aspect_ratio | COMBO | 1:1 | 9 options: 1:1, 2:3, 3:2, 16:9, 9:16, 4:5, +3 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| conditioning | STARFLOW_V_CONDITIONING | — |