DEV Community

Cover image for The Reference Carried the Count, the Prompt Carried the Layout
Merl Merl
Merl Merl

Posted on

The Reference Carried the Count, the Prompt Carried the Layout

There is a piece of advice that circulates around reference-based image generation: once you attach a reference image, keep your prompt short. Describe the new scene, leave the character alone, because re-describing what the reference already shows will fight it.

I wanted a number on that, so I designed a character to fail in measurable ways.

Designing a character as a test fixture

The character is an original design called Asagi, built on PixAI with the Tsubaki.3 model. The visible design has seven components, but two of them exist purely as assertions:

  • A count. Three small brass bells on a braided green cord at his sash. Countable at a glance, and wrong answers are unambiguous.
  • A side. A black leather arm guard on one forearm, a white cloth wrap on the opposite wrist. An asymmetric pair, so a failure shows up as either symmetry or a swap.

Everything else in the design - the indigo haori with a mustard band, the jade green eyes, the pale ochre lock of hair, the thin scar across one eyebrow - serves as background signal. The bells and the arm pair are the assertions that either pass or fail.

This matters because "does it look like the same character" is not a testable claim. "Are there three bells?" is.

The test matrix

Three conditions, same scene, same model, same settings:

condition A:  prompt only          (full character description, no reference)
condition B:  prompt + reference   (full character description, reference attached)
condition C:  reference only       (scene described, character not mentioned)
Enter fullscreen mode Exit fullscreen mode

The scene was identical in all three: the character seated at a low table in a sunlit tea house. Condition C's prompt reads in full:

The same character sitting at a low table inside a sunlit tea house
in the daytime, a small cup in front of him, relaxed expression,
paper screens and warm wooden beams behind him, upper body and
both hands visible, anime illustration.
Enter fullscreen mode Exit fullscreen mode

Results

Condition Bell count Asymmetric pair
A, prompt only 5 (and 2 on a repeat run) correct
B, prompt + reference 3 correct
C, reference only 3 collapsed to matching cuffs on both arms

Condition A never got the count right across two runs. Two bells the first time, five the second. A number in a prompt behaves like a density hint rather than an integer.

Condition C got the count right and lost the layout. The reference carries what a pixel-level encoder can carry: the shape and color of a bell cluster, the geometry of a face. Which forearm wears what is a relational fact, and the model resolved it toward the symmetric default.

Condition B was the only pass on both assertions. The advice I started with is too broad: the reference and the description populate different fields, and supplying both costs one extra sentence.

Does stacking references help?

Tsubaki.3 accepts up to three reference images, so the obvious follow-up is whether more references buy anything. I ran the hardest prompt in the set, a full-body low-angle shot in a storm, with one, two, and three references attached. Then I repeated the whole ladder with a second fixed seed, so the reference count was the only variable.

seed 1:  1 ref -> 3 bells   2 refs -> 3 bells   3 refs -> 5 bells
seed 2:  1 ref -> 3 bells   2 refs -> 3 bells   3 refs -> 3 bells
Enter fullscreen mode Exit fullscreen mode

Five out of six correct, and the single failure did not reproduce. Run-to-run variance is larger than any effect from the extra reference slots. One good reference did the job, and I would treat the second and third as optional rather than an upgrade path.

More inputs usually means more constraint. Here it did not, and the feature invites the opposite assumption.

What survives a wardrobe change

The destructive test: I moved the character out of a period haori into a bomber jacket and jeans on a modern crosswalk, which deletes every clothing-bound component of the design by definition.

Surviving: hair, the ochre lock, eye color, face.
Gone with the outfit: haori, bells, arm guard, as expected.
Gone unexpectedly: the eyebrow scar and the cord tying his hair at the nape.

The useful abstraction here is that identity splits into body-bound and clothing-bound components, and a wardrobe change is a scoped delete on the second group. If a character's recognizability is entirely stitched onto one jacket, the character has a single point of failure.

The scar went missing again in a six-panel expression sheet generated from the same reference. The pattern across both: the finest facial detail drops when the output format diverges sharply from the reference, and a grid of six small heads is a long way from one figure on a street.

Notes from the panel

Three implementation details that cost me runs before I understood them.

Attachment order matters. Attach the reference, then write the prompt. Adding it afterward reset my settings more than once.

The output inherits the reference's aspect ratio. My reference was 16:9, and every reference-based generation came back wide regardless of what I set. My first prompt-only run, with nothing attached, defaulted to portrait and had to be set by hand.

The prompt you send is not the prompt that runs. PixAI displays a rewritten version beside your input, and that version had pulled a physical description of the character out of the attached image. Reading it told me which traits the system extracted and which it invented. If you are debugging an unexpected result, this field is the first place to look.

The takeaway

Character consistency is not one property. It decomposes, and the components have different failure modes and different owners:

  • The reference owns counts, faces, palette, silhouette.
  • The prompt owns arrangement, sides, and everything relational.
  • Neither owns the finest details once the output format moves far enough away.

If you work with recurring characters, build one or two countable, one-sided details into the design on purpose. They cost nothing, and they turn consistency into something you can check rather than something you squint at.

Try it with Character Reference on PixAI if you have a character sitting in a folder that deserves more than one image.

Top comments (0)