Split a character sheet into single views
Give it a character sheet laid out as an even grid and the cells you want; get one JPEG
per view, named <handle>_1.jpg, <handle>_2.jpg… in the order you asked for them.
Every model that takes a character reference gets these single views, never the sheet:
handed a whole sheet, a model tends to echo its layout and return a collage, a split
frame or the person twice. Single views also let you drop the weakest view when a model
caps its reference images. For a sheet that isn't an even grid, crop each view with the
--box option of python-conform-to-1080p, with --size equal to the box.
Inputs
- The sheet. The standard one is 2x2, four equal square panels row by row: cell 0 front close-up, cell 1 profile close-up, cell 2 full body from the front, cell 3 full body from behind.
- A handle for the character (the name used in the job:
Lena,Presenter). --grid COLS ROWSif it isn't 2x2;--cellsfor the views to keep.
Run it
Write the script in references/split_character_sheet.md into the project folder as is, then:
exec("python", ["split_character_sheet.py", "references/lena_sheet.png", "--handle", "Lena",
"--cells", "0", "1", "2", "--out-dir", "refs"], cwd="<job>")
Which cells:
| The shot | --cells |
|---|---|
| Faces the camera, or most shots of a dialogue scene | 0 1 2 (front, profile, full; no back) |
| Seen from behind, or the back of the head in frame | 0 1 3, and say in the prompt that this shot sees them from behind |
| Full body staging in a set | 0 2, plus 3 if they turn away |
Run it once per character and per set of cells, into a folder per job (<job>/refs/).
A second run with the same handle overwrites <handle>_1.jpg…; use another handle
(Lena_back) to keep two sets side by side.
What you get
One JPEG per kept cell (quality 95, long side at most 1920 px; a 2048 px 2x2 sheet gives
1024 px views) and a JSON line on stdout: sheet_size, grid, cell_size, and per view
its cell, view (the name on a 2x2 sheet), path and size. Use the view names
when you write the reference lines in a prompt ("Image 3 is Lena, full body, from
behind").
Tips and traps
- Cut every sheet before the first render that uses it, and reuse the same files for the whole job, so each model call sees the same views.
- Attach a character only to the shots they are in, and only the views that shot needs. Extra portraits push an edit model to redraw people it should keep.
- Recast a shot from behind with the back view. Without it, a shot that shows only the back of a character's head gets missed or redrawn as someone else.
- When you edit a character's look (a badge removed, a new jacket), edit the sheet or the views too, or the video models put the old detail back.
- The cells are equal divisions of the image, so a view can carry a sliver of the sheet's divider lines at its inner edges.
Check it
Open the views once: each holds one whole figure or face, nothing cut off at a cell
edge, and the view names match what you see. If a figure spans two cells, the sheet
isn't the grid you passed: check --grid, or crop by box instead.


