FLUX2 Subject Array π
FLUX2 Subject Array is how multi-subject FLUX.2 scenes stay sane
- subject_1
- subject_2
- subject_3
- subject_4
- subject_5
- subject_6
- subject_7
- subject_8
- subject_9
- subject_10
- subject_11
- subject_12
- subjects
- subject_count
- summary
Multi-subject scenes are where FLUX.2 prompts fall apart - write "a mug, a laptop, and a plant" in one breath and the model smears them together. FLUX2_SubjectArray is the node that keeps them apart. It collects up to twelve subject objects from FLUX2_SubjectCreator into one ordered array, which becomes the subjects field of your final JSON prompt. Order is the point: the README is explicit that subject_1 is typically the primary/foreground element, and the model reads it as such.
It's part of ComfyUI-FLUX2-JSON (MushroomFleet's "FLUX2 Prompt Builder"), under FLUX2_Prompt_Builder/Subjects. It's a pure collector node - no prompt text enters or leaves here, just structured subject objects.
The inputs
Twelve inputs, subject_1 through subject_12, each accepting a FLUX2_SUBJECT object straight off a FLUX2_SubjectCreator node. All optional. Empty slots are filtered out automatically - the source iterates the inputs, keeps only the non-None ones, and preserves slot order. So you can wire subjects into slots 1, 5, and 9 and the array comes out in that order, no gaps. There are no string fields here at all; if you want a description that isn't a SubjectCreator object, this node won't take it.
The three outputs
subjects(FLUX2_SUBJECT_ARRAY) - the ordered list. This is the one that matters: wire it into FLUX2_PromptAssembler'ssubjectsinput.subject_count(INT) - how many subjects survived the filter. Boring but useful when you're scripting or just confirming a connection took.summary(STRING) - a numbered overview: "1. Minimalist ceramic coffee mug... / 2. Sleek modern laptop...". Descriptions longer than 50 characters get truncated to 47 plus an ellipsis, so it's for eyeballing, not for the prompt. Pin it to a text node if you want the scene checklist on screen.
The node re-executes on every change (its IS_CHANGED returns nan), so the summary stays in sync while you shuffle subjects around.
Install
Same one-time pack install:
- ComfyUI Manager: search "FLUX2 Prompt Builder" β Install β restart.
- Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/MushroomFleet/ComfyUI-FLUX2-JSON.git
No models, no dependencies beyond stdlib. Under FLUX2_Prompt_Builder/Subjects.
The trap: order is a promise you're making
Because the array preserves slot order and the encoder treats it as a list, the FIRST subject you connect is the one the model treats as the star of the shot - foreground, most detailed, most prominent. The README's example workflow deliberately puts the coffee cup in subject_1 over the laptop and plant, foreground-priority. If you connect them in a random order and wonder why the model keeps framing the plant, that's your answer: reorder the slots, don't fight it with prompt words. And if a subject renders wrong, fix it at the source - the SubjectCreator that made it - not by piling adjectives onto the array. The whole point of this structure is that each object stays a clean, separate block the VLM can read without ambiguity.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| subject_1opt | FLUX2_SUBJECT | β | |
| subject_2opt | FLUX2_SUBJECT | β | |
| subject_3opt | FLUX2_SUBJECT | β | |
| subject_4opt | FLUX2_SUBJECT | β | |
| subject_5opt | FLUX2_SUBJECT | β | |
| subject_6opt | FLUX2_SUBJECT | β | |
| subject_7opt | FLUX2_SUBJECT | β | |
| subject_8opt | FLUX2_SUBJECT | β | |
| subject_9opt | FLUX2_SUBJECT | β | |
| subject_10opt | FLUX2_SUBJECT | β | |
| subject_11opt | FLUX2_SUBJECT | β | |
| subject_12opt | FLUX2_SUBJECT | β |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| subjects | FLUX2_SUBJECT_ARRAY | β |
| subject_count | INT | β |
| summary | STRING | β |