Hand-written 507-token prompt vs Qwen3-14B for an Anima 4-char LoRA band scene
Contents

In the previous experiment on poses and character-to-character interactions, single-character dynamic poses worked, but two characters touching happened for whoever stood at the center of the frame rather than for the pair I named. Putting the touching pair in the center and pinning the front/back head count got most of the instructions through. Even then, the results were unstable as finished illustrations.
Next up is a more complex scene. To assign each of the 4 girls a different position, instrument, and action at the same time, I went with a girls-band picture.
Generation setup and pass criteria
| Item | Setting |
|---|---|
| model | anima-base-v1.0.safetensors |
| text encoder | qwen_3_06b_base.safetensors |
| 4-char LoRA | anima-4char-v1_epoch100.safetensors |
| LoRA strength | model 1.0 / clip 1.0 |
| Turbo | none |
| sampler | er_sde / simple |
| steps / cfg | 25 / 4.0 |
| resolution | 1152×896 |
| seed | 42, 1234, 9999 |
The 3/3 numbers below count how many of the 3 seeds kept the 4 girls distinguishable with their 4 roles identifiable. Whether fingers, instruments, and faces are actually finished is a separate question, and an image where 4 people show up but the roles are unreadable doesn’t count.
The 4-girl band brief
Three girls on strings and vocals in front, one drummer in the back.
| Position in frame | Character | Role |
|---|---|---|
| Front left | Kei | Plays a blue 4-string bass, sings into the left mic |
| Front center | Kana | Plays a red 6-string guitar, sings into the center mic |
| Front right | Kurara | Plays a white 6-string guitar, sings into the right mic |
| Back, left of center | Koharu | Plays a drum kit on a riser. No mic |
This lineup packs in 3 kinds of instruments, 3 mics, a 3-front/1-back split, the size difference between near and far, and hands actually playing the instruments. The background isn’t blank either — one live stage with lighting.
The best hand-written prompt, v11, wraps each character into one continuous clause of name → minimal look → position → instrument → action → mic, then briefly restates the 4 roles at the end. In all 3 seeds, almost everything I asked for came out: 4 distinguishable girls, 3 in front, blue bass, red guitar, white guitar, Koharu in the back, a drum kit, and 3 mics up front.
That said, none of the 3 passes as a strictly finished image. Fingers on the strings, instrument details, and whether the sticks actually touch the drum kit are shaky in every seed. The 3/3 here means what I specified mostly showed up, at the level of telling the 4 girls and 4 roles apart.
Also, this is the only lineup I tested — 3 front plus 1 back — and I picked instruments that are easy to tell apart by color and shape.
Prompts written by Qwen3-4B–14B couldn’t line up the instruments and roles
Anima uses Qwen3-0.6B as its text encoder, which is tiny for an LLM. Whether 0.6B can actually read a long prompt stuffed with 4 characters’ looks, positions, instruments, and actions is questionable. So would a bigger Qwen help?
As a first experiment that doesn’t require touching the encoder, I gave Qwen3-4B, 8B, and 14B the scene spec in Japanese and had them write English prompts for Anima. The bigger Qwen only writes the text here — the text encoder at generation time stays the original Qwen3-0.6B in every condition.
| Prompt writer | What happened in the prompt | Image result |
|---|---|---|
| Qwen3-4B | Repeated role blocks out to 1,002 tokens | 4 girls appear, but Kana stands on the right and Kurara and Koharu collide in the drum area |
| Qwen3-8B v1 | Kept looks and roles, but added the contradiction of holding a mic stand while playing with both hands | Kei’s bass turned upright-bass-like; the left/right mics and the stage disappeared |
| Qwen3-8B v2 | Organized the stage, instruments, and mics but deleted all 4 girls’ appearance markers | Characters swapped standing positions, and the drum kit disappeared |
| Qwen3-14B v2 | First to keep looks, positions, all 4 roles, and the stage at once | No seed finished. The drum kit vanished, Koharu floated, and the white guitar came out shaped like a bass |
Images follow the table order: Qwen3-4B, 8B v1, and 8B v2 at seed 42, 14B v2 at seed 1234.
At 14B, the ability to keep my constraints in the text clearly improved. The images still lost the drum kit, and what I specified never fully showed up. Same as my earlier comparison where Qwen Max and Claude wrote the prompts: writing natural, detailed text and writing text that goes through Anima’s conditioning are different skills.
Meanwhile, 8B v2 deleted every appearance marker. The characters then swapped standing positions. Anima’s official model card also shows examples that include each name with a basic look in natural sentences for multi-character scenes. Hand-written v11 does the same thing — a short look right after the name, then straight into the instrument and action.
Swapping the encoder to Qwen3-4B stopped with an error
Next, I swapped the encoder itself. Anima’s Qwen3-0.6B hidden states are 1024-dimensional; Qwen3-4B’s are 2560. In ComfyUI’s Anima implementation, the LLMAdapter’s source_dim is fixed at 1024. Pointing CLIPLoader at Qwen3-4B as-is gives this error in KSampler:
linear(): input and weight.T shapes cannot be multiplied
(485x2560 and 1024x2048)
Just swapping the safetensors stops at this shape error. To reach generation you need at least a 2560→1024 projection, or a new LLMAdapter.
To get past it, I took hidden states for the same 28 prompts from both 0.6B and 4B, standardized the 4B side, and trained a linear bridge down to 1024 dimensions. On 9 validation prompts the cosine similarity to the 0.6B side reached 0.972, but on the long band v11 it was 0.9028, with a mean squared error (MSE) — a measure of how far the values are off — of 3.1816 per element. Loading this into Anima did generate, but Koharu and the drum kit disappeared and only 3 girls remained.
The bridge is trained to make 4B look like 0.6B, so it also erases whatever 4B adds. That means this can’t separate whether 4B is bad or the bridge is bad. To test it properly, the LLMAdapter itself has to be retrained on the image-generation loss.
The developer’s own trials point the same way. The Anima developer swapped in Qwen3.5-2B-Base, trained a new LLMAdapter for 3 days, got back to about 95% of the original quality, but reported no visible improvement in prompt understanding under manual evaluation, and the loss never beat the original setup. They estimated another ~2 weeks to close the gap and kept 0.6B. Going by the developer’s discussion report, an experiment that just swaps in a bigger Qwen doesn’t seem worth running.
Splitting conditioning per character left 3 girls
I also wondered: if “where each person ends” were explicit in the conditioning, maybe they’d mix less. How a prompt splits into the Qwen and T5 paths and merges into one conditioning through the LLMAdapter is covered in my earlier article digging into Anima’s conditioning. What I was curious about this time was the trailing zero padding — reading the text encoder side and the LLMAdapter side together, it’s just length padding when output is under 512 tokens, not a separator between characters.
I split band v11 into 6 blocks: the opening scene description, one block each for Kei, Kana, Kurara, and Koharu, and the closing role recap. Each block went through Qwen, T5, and the LLMAdapter independently, and I concatenated the post-LLMAdapter sequences.
Naive concatenation gives 564×1024, and the average per-token vector length (norm) jumped from the usual 3.35 to 5.12 — mostly noise. After dropping the end-of-sequence tokens (EOS) of the middle 5 blocks to get back to 559 tokens and matching the overall mean and standard deviation to normal conditioning, generation itself ran. But the count dropped to 3 girls, Kana’s face bled into everyone, and I can’t tell who the left and right girls are. The center instrument turned into something keyboard-like. A complete failure.
The LLMAdapter is the part that aligns Qwen hidden states with the T5 token sequence across the full context. Processing each character independently and stitching them afterward threw away the positional relationships across the full text. The developer also explains that concatenating separately encoded prompts had little effect for artist mixing and, with no position embeddings added, behaves close to averaging. The zero vectors never worked as separators.
Shrinking the prompt to 507 tokens
Anima’s training code tokenizes both Qwen and T5 with max_length=512, truncation=True. Going by the training-side implementation, v11 at 559 T5 tokens sits outside the training length distribution. Current ComfyUI inference doesn’t truncate sequences over 512, though — it only zero-pads sequences under 512.
Without changing a single character in the 4 character blocks and the closing role recap, I deleted only the duplicated camera and lighting descriptions. Qwen went 477→432 tokens, T5 went 559→507.
4 names and head count → one stage, 3 in front →
Kei's look, left, blue bass, left mic →
Kana's look, center, red guitar, center mic →
Kurara's look, right, white guitar, right mic →
Koharu's look, rear riser, drum kit, no mic →
3 prop shape contrasts → the 4 roles once more
All 3 seeds kept the 4 distinguishable girls, 3 in front, 3 kinds of instruments, 3 mics, and Koharu with the drum kit in the back. Images are seeds 42, 1234, and 9999 in order.
I can’t claim 507 beats 559. Both kept the rough layout 3/3, and fingers and instrument details stayed unstable in both. The shortened 507-token version didn’t shuffle who plays which instrument either, and the length now fits within the 512 used at training time.
v11 and the 507-token version are written the same way. Head count and all 4 names up front, each name → minimal look → position → action/props chunk kept unbroken, and the overall structure — like 3 front, 1 back — stated briefly before anything else. Similar props differ not just in color but in string count, neck length, and body shape, and the names and roles get one short restate at the end. Only quality tags and duplicated camera/lighting descriptions got deleted.
Every training caption was already under 512 tokens
Up to this point I assumed the fix was “keep the next training captions under 512 too” — but counting every caption of the current 4-char LoRA with the actual tokenizers, no caption exceeded 512 in the first place.
I ran all 896 training captions through the Qwen and T5 tokenizers Anima uses.
| tokenizer | min | median | p90 | p95 | p99 | max |
|---|---|---|---|---|---|---|
| Qwen | 55 | 80 | 131 | 144 | 166 | 206 |
| T5 | 58 | 87 | 156 | 166 | 192 | 248 |
Zero captions exceeded 512 under either count. Truncation during training is off the table. The 896 captions contain duplicates — 513 unique strings — and only 10 of those contain all 4 trigger names at once.
| Characters per caption | Unique captions |
|---|---|
| 1 | 343 |
| 2 | 120 |
| 3 | 40 |
| 4 | 10 |
Those 10 break down into 7 quad_pose_1–7 captions and 3 quad_stand_01–03 captions. The former are all the fixed order Kurara → Kei → Kana → Koharu, a single row on a white background, with symmetric everyone-does-the-same-thing poses: holding hands, jumping, hugging, peace signs. The latter vary the order and outfits, but are still a single row on white.
Not one training example gives the 4 girls different positions, different props, and different actions. The current LoRA being strong at 4 standing figures on white, and drifting toward center clustering or those same synchronized poses once roles pile up, most likely traces back to this bias in the 10 examples.
Writing captions differently for 1-girl and 4-girl images
With Kana’s solo LoRA, any detail written out in the captions stopped baking into the trigger and only appeared when the prompt asked for it. The design there was to trim the descriptions and let kanachan absorb the hairstyle and outfit. That thinking still holds.
But in a multi-character LoRA, 4 triggers share one image. Because these captions trimmed the descriptions, they also lost the cues for which color, hairstyle, outfit, and prop belongs to whom. In the 4-girl captions Kana mostly gets a brown side ponytail and an ahoge, with no fixed shoulder-length hair, short side ponytail, or blue scrunchie. Simple standing shots got by on triggers alone, but once instruments, poses, and depth come in, she kept turning into a generic ponytail or a different hair color.
Solo images keep the trimmed captions so the trigger absorbs the design; only multi-character images keep each girl’s minimal distinguishing look inside her clause. The order stays name → look marker → position → role → props throughout, with the 4 positions and roles shuffled across captions so no instrument or action gets welded to one girl or one standing spot.
Turning the background white made even Koharu disappear
Another option is generating the background with a different model later and letting Anima handle only the characters. I removed just the stage and colored lighting from the 507-token version and switched to white background, simple background, isolated group. In the one seed-42 image, Koharu disappeared, leaving 3 girls — and Kurara sits on the drum stool while playing guitar.
One seed, so this doesn’t prove white backgrounds always fail. But even if the background is decoratively unnecessary, one continuous stage and rear riser may be doing real work anchoring who stands in front of whom. If I try the background-swap pipeline, the first thing to check is whether minimal structures — floor, stage, riser — need to stay.
Next: adding 4-girls-at-once captions to the LoRA training data
The current LoRA can produce the band up to a 3-front/1-back lineup from a prompt. Since the 4 roles survived in 3 seeds, this doesn’t look like a plain capacity shortage. Finished images — fingers, prop shapes, faces — are still unstable, though.
Having a bigger Qwen write the prompts never lined up the instruments and roles, even at 14B. The encoder swap stops at the dimension mismatch, and both the linear bridge and per-character conditioning splits made things worse. Anima’s LLMAdapter itself is trained as the part that pulls the Qwen space toward the existing Cosmos T5 space, so testing a bigger encoder means retraining the LLMAdapter on the image-generation loss.
Next, without touching the solo, 2-girl, and 3-girl captions, I’ll add around 24–40 captions that shuffle the 4 girls’ roles, positions, and props, and rerun the same 507-token prompt across 3 seeds.