Character Panel

v2.3.0
io.github.tobiasfong/character-panel Checked 3 days ago Published 5 days ago

Character bible, new poses and panels for comics, rendered with FLUX 3 Klein on local ComfyUI.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

register_character

Add (or grow) a character's reference set in the Character Bible. Copies each image into the bible and records/updates metadata. Input-format agnostic — a ChatGPT/Midjourney sheet is as valid as commissioned art. Calling again on an existing character_id APPENDS new images (turnarounds/ expression sheets accumulate over time); only overwrites a field if passed — omitted fields keep their existing value. Args: image_paths: One or more reference images to add. character_id: Short id to reference later (e.g. "aria"). Auto-slugged from name…

ParameterTypeDescription
image_paths *array
abilitiesstring
character_id
descriptionstring
name
notesstring
profilestring
projectstring
tags

get_character

Fetch one character's canon: description, reference image paths and the finished panels that establish each detail. CALL THIS BEFORE WRITING ANY PROMPT THAT INVOLVES THIS CHARACTER, and paste the returned description verbatim rather than describing them from memory or from looking at a panel. Until this tool existed there was no way to obtain a character's reference path through the MCP interface, so prompts got hand-written and drifted — a panel shipped with the wrong hair color and the wrong eye color, both of which the bible had recorded correctly all along.…

ParameterTypeDescription
character *string
projectstring

list_characters

List the characters registered in a project's Character Bible.

ParameterTypeDescription
projectstring

forget_character

Remove a character from a project's Character Bible. By default only the manifest entry is removed; pass delete_images=True to also delete their reference images from disk.

ParameterTypeDescription
character_id *string
delete_imagesboolean
projectstring

list_projects

List the comic projects that have a Character Bible.

generate_character_concept

Generate character-concept candidates for a character who doesn't exist in the bible yet — Concept Genesis on-ramp 1 (ARCHITECTURE.md §8b.6): a writer with a story but no reference art. Text-to-image on FLUX 3 Klein, one seed per candidate, on a plain pale gray backdrop. Output is RGB, NOT matted, and deliberately so: concepts are candidates to look at and choose between, and the chosen one gets cropped into a reference (`crop_reference`), which wants the backdrop intact. Does NOT register anything. Look at the candidate, then register_character(image_paths…

ParameterTypeDescription
description *string
heightinteger
label
ninteger
projectstring
seed
style_promptstring
widthinteger

generate_character_pose

Render a registered character alone, in a new pose, on a clean backdrop. FLUX 3 Klein, with the character's PRIMARY REFERENCE as image 1 and the bible description in the prompt: identity holds through the pose change. Describe the pose in words -- there is no ControlNet on Klein. ⚠ If the pose asked for is the one the reference already shows, Klein COPIES the reference, flaws and crop included (a tight crop came back cut off at the head or feet 17 times in 40). Pad the reference ~18% on its own backdrop color before a same-pose request. Output is matted to…

ParameterTypeDescription
character *string
pose *string
heightinteger
matteboolean
projectstring
promptstring
seed
widthinteger

generate_reference_sheet

Grow a registered character's reference set toward the Avery-style checklist — front, back, and a few 3/4 expression close-ups — one FLUX 3 Klein render per view, each from the character's primary reference (ARCHITECTURE.md §8b.6). For the four body angles, generate_turnaround_sheet is the better tool: one render, each view in its own layout box, a genuine profile included. This one is for the close-ups and the poster. ⚠ The front view usually comes back close to a copy of the reference -- Klein copies when the pose asked for is the pose it was shown.…

ParameterTypeDescription
character *string
combineboolean
heightinteger
matteboolean
projectstring
seed
views
widthinteger

generate_turnaround_sheet

Front, three-quarter, profile and back in ONE FLUX 3 Klein render, from the character's primary reference, each view held in its own layout box and cut out EXACTLY by that box (no gap search). Measured 2026-10-17: four true views including a genuine profile, no strangers, 0.0% of figure pixels outside the boxes, ~86 s. The staged way to get a new character into the bible: 1. generate_character_concept(description=...) — one candidate. Not right? Regenerate before the next step. 2. register_character(image_paths=[<the approved concept>], ...) — make it…

ParameterTypeDescription
character *string
extra_promptstring
heightinteger
projectstring
seed
widthinteger

edit_character_image

Edit or re-pose an existing image with FLUX 3 Klein. WITHOUT mask_box, the image is a REFERENCE and the instruction describes the result. Every pixel is drawn fresh with the image's identity, so this is also how a character is re-posed from their own art, or a figure is re-framed on a taller canvas. Describe the whole result, not only the change. WITH mask_box (x0, y0, x1, y1, in the source's pixels), only that region is redrawn and pasted back: the change outside it is exactly zero, where the model on its own redraws the whole frame (18.5 of mean change outsi…

ParameterTypeDescription
image_path *string
instruction *string
canvas_height
canvas_width
mask_box
matteboolean
matte_tol
projectstring
seed

generate_scene

FLUX 3 Klein: several registered characters in ONE render, each from their own primary reference -- a CG with its room and light in a single pass. Measured 2026-10-17: two characters re-posed together, each still themselves, with no attribute bleed, on 3 of 3 seeds. On FLUX.1 this needed a solo render per figure, a matte each, a plate and a composite by hand. scene: what happens, in plain words, referring to the characters as "the character from image 1", "image 2"... in the order given. Describe what their bodies DO. Two cautions from testing: -…

ParameterTypeDescription
characters_in_scene *array
scene *string
heightinteger
projectstring
seed
widthinteger

generate_expression

FLUX 3 Klein: an expression as a WHOLE new body, rendered from scratch and matted. The author's rule, 2026-10-17: "Body can move." Body language and posture follow the mood, and a pose that shifts with the face makes the change easier to read -- so an expression is its own full body, never a face pasted onto the base. It is rendered from the character's reference with the base body's pose and prompt plus the expression, on a seed DIFFERENT from the base's. Reusing the base's own seed froze the posture -- the body came back with a mean change of 0.5 of 255 -- which…

ParameterTypeDescription
character *string
expression *string
pose *string
seed *integer
projectstring
promptstring

compose_reference_sheet

Assemble the Avery-style poster sheet (same layout as generate_reference_sheet's combine=True path) from images that already exist — e.g. panels sliced out of generate_turnaround_sheet's output via crop_reference, or any other curated set of views — instead of generating fresh views the way generate_reference_sheet does. Pulls the character's name/profile/abilities/description text from the bible automatically, same as generate_reference_sheet. Args: character: A character_id already in the bible. front_path: The full-body front view — the lar…

ParameterTypeDescription
character *string
front_path *string
back_path
expression_labels
expression_paths
projectstring

compose_full_reference_sheet

A denser Avery-template-style poster than compose_reference_sheet: bordered boxes across left/center/right columns (not one stacked text column), front+back side by side in one box, plus optional FUNCTIONS/FILE NOTES bullet boxes, a boxed prop illustration, an ability-mechanism diagram box, and an "IN ACTION" pose row. Same staging discipline as compose_reference_sheet: nothing auto-registered. Do NOT invent content for functions/notes/prop/diagram — these need real text/images the caller has. Leave a param unset rather than filling it with placeholder conten…

ParameterTypeDescription
character *string
front_path *string
action_labels
action_paths
back_path
diagram_path
expression_labels
expression_paths
functions
notes
projectstring
prop_captionstring
prop_labelstring
prop_path
subtitlestring

apply_gradient_background

Cut a character image's white background out and place it over a fresh vertical two-color gradient — a lightweight alternative to compositing onto a full illustrated background (ARCHITECTURE.md §8b.11: illustrated scenes were tried and abandoned for reference-sheet use — a glowing VFX pose, e.g. a spell effect, renders with a soft fade to white with no hard edge, and no cutout fix removed the resulting halo cleanly against a high-contrast illustrated scene). Gradients sidestep that: for a pose with a glow effect, pick a LIGHT-toned pair (close to white near…

ParameterTypeDescription
bottom_color *array
image_path *string
top_color *array
out
projectstring

apply_vfx_overlay

Add a glow/spell-effect layer onto an already-composited image via screen blend — the fix for the glow-halo problem (ARCHITECTURE.md §8b.11/§8b.12): generate the character pose WITHOUT the effect baked in (cuts out cleanly, no halo risk), generate the effect separately on a plain BLACK background (e.g. "glowing blue-white ice crystals bursting in the air, plain solid black background, no character"), then layer it on with this tool. Screen blend is the correct math for light-on-black source material: a black vfx pixel leaves the base unchanged, white saturat…

ParameterTypeDescription
base_path *string
vfx_path *string
x *integer
y *integer
out
projectstring

crop_reference

Slice a composite character-concept sheet into clean single-view crops, ready for register_character — Concept Genesis on-ramp 2 (ARCHITECTURE.md §8b.6): a composite sheet from a ChatGPT/Midjourney sheet generator (hero pose + expressions strip + text overlay, all in one image) is NOT usable as a direct img2img/IP-Adapter reference. The model would condition on the layout — text blocks, panel borders — not the person. Crop boxes are pixel coordinates [x0, y0, x1, y1], top-left origin. Get them by eyeballing the sheet yourself, or by looking at it once (visio…

ParameterTypeDescription
boxes *array
image_path *string
out_dir

compose_panel

Composite a matted character cutout onto a background plate — deterministic, GPU-free, instant to iterate. Positioning is feet-anchored: the character is scaled to `height_px` tall and placed so its feet land at (feet_x, feet_y). This is exactly the shape webcomic-background-mcp's generate_city_scene(anchor_x=..., anchor_z=...) reports back (height_px / feet_y_px) — pass that output straight through. For multiple characters in one panel, call this once per character: start with `background` for the first, then pass the previous call's output back in as `ba…

ParameterTypeDescription
character_layer_path *string
feet_x *number
feet_y *number
height_px *number
background
base
out

fix_hands

Bad hands on a sprite: candidates for EVERY hand on ONE sheet, to pick from. The one route that fixes hands (measured 2026-11-07, after two hours of routes that do not): in a full-body render a hand is ~50 px, too small for fingers, so each hand is cropped WITH its sleeve, enlarged 4x, redrawn in a box sized to a natural hand that starts INSIDE the sleeve (so the cuff, hem and wrist are drawn together), shrunk back, and pasted with a fade over the sleeve's plain cloth. No code patching of hand pixels, no erasing first (a flat erase patch comes back as a flat pale h…

ParameterTypeDescription
image_path *string
hand_boxes
promptstring
seed_baseinteger
seedsinteger

apply_hand_fix

Paste the picked hand candidates from a fix_hands run into the raw picture. hands_dir: the folder fix_hands reported (it holds the manifest). picks: {"0": seed, "1": seed} -- one seed per hand; a hand left out keeps its current drawing. matte: also cut the result out (RGBA), ready to install.

ParameterTypeDescription
hands_dir *string
picks *object
matteboolean

touch_up

One SMALL defect -- a dent in an outline, a stray line, a smear -- redrawn at 6x inside a tight box, built on what is there. Only the box changes. Use it after a hand is otherwise right; for a wrong hand use fix_hands. Measured: a finger's dented outline was fixed first try this way, where three code edits of the same spot each made it worse. box: [x0, y0, x1, y1] around just the defect.

ParameterTypeDescription
box *array
image_path *string
instructionstring
seedinteger

new_episode

Start an episode of STILLS from the author's script: one frame per picture. Each frame: {"no", "section", "scene", "script": [his lines on this picture], "staging": "<his staging line>", "chars": [bible ids, each given its bible picture as "image N"], "extras": [bible ids in words only], "prompt": "<the scene sentence; {place} becomes the scene's place words>"}; optional "costumes", "desc", "reuse" (another frame's number whose picture this one shows), "layout" ([{"desc", "box"}]). scenes: {"<id>": {"place": "<words>", "costumes": {...}, "extras_lead": "..."}}; sections: {…

ParameterTypeDescription
episode *string
frames *array
project *string
path
scenes
sections
seed_baseinteger
size
stylestring

episode_status

What needs doing on an episode: counts by status, the author's notes not yet applied (with whether he asked for a reroll), pictures waiting for Claude's check, pictures Claude passed that wait for him, and repairs in progress. READ EVERY NOTE BEFORE ANY REROLL (his rule, after one that ignored his note). A note is applied when the frame's prompt or descriptions carry it -- set_frame(..., note_applied=True) -- and a reroll he asked for is held on the page until then.

ParameterTypeDescription
episode_path *string

frame_prompt

The exact prompt and reference pictures a frame renders with -- check it before a reroll.

ParameterTypeDescription
episode_path *string
no *integer

set_frame

Change a frame: its prompt, per-frame character descriptions (`desc`), cast, costumes, layout boxes. `desc` replaces a character's bible description for this frame only -- the fix when the bible's expression words win over the prompt ("calm, composed", "a faintly smug smile" came back on frames that asked for shock). Strip the expression words; keep hair, eyes and costume as the bible has them. note_applied: True once the author's note on this frame is reflected in it. A reroll he asked for is held until then; queue it with render_frames afterwards.

ParameterTypeDescription
episode_path *string
fields *object
no *integer
note_appliedboolean

open_review

Start the review page for an episode (or find it already running) and give the address. The page shows every picture with its script lines and staging; the author approves, rerolls, or writes a note and asks for a fix. It renders rerolls itself, one at a time, a clicked one ahead of the rest. It runs as its own windowless process, so it keeps going between conversations; its log is review_server.log beside the episode file.

ParameterTypeDescription
episode_path *string
portinteger

render_frames

Queue pictures on the review page's renderer, in this order (open_review first). A picture whose author note is not yet applied is NOT queued -- it is returned under `held` with the note. Klein renders one at a time; queue a section, check it as it lands, then the next. After each render: check it (zoom_grid on anything doubtful, count fingers on every visible hand at full size), then check_frame. Look for extra or missing people, clones, realistic-looking people among the anime cast, ghosts, bad hands, outfits off the bible, and the staging the author wrote.

ParameterTypeDescription
episode_path *string
nos *array
frontboolean
portinteger

check_frame

Record Claude's check of a picture, shown on its card before the author looks. state: "pass" (say what was fixed, if anything) | "fail" (say what is wrong) | "fixing" (say how) | "pending". Pass only what you would show him; he still judges every picture, hands above all.

ParameterTypeDescription
episode_path *string
no *integer
state *string
notestring

attach_fix

Put a repaired picture on a frame's card as its newest version (the author picks between versions). Give a repaired file a NEW name: the page reloads by file time, but a new name keeps every version.

ParameterTypeDescription
episode_path *string
file *string
no *integer

approve_frame

Approve a version (default the newest) -- ONLY on the author's say-so; he approves on the page himself as a rule. Copies it to approved/pNN.png and shows only it on the card.

ParameterTypeDescription
episode_path *string
no *integer
indexinteger

fix_box

Klein redraws ONE PART of a still -- a hand, a mouth, a prop -- and only that box comes back. box: [x0, y0, x1, y1] in the picture's pixels, around the whole thing to redraw (a whole hand, cuff to fingertips). MEASURE it on zoom_grid at full size -- a box read off a scaled-down view once sat on an eye instead of the mouth. It sets SIZE as well as place: fit it to the thing. old: what is in the box once it is wiped ("A blurred patch below the woman's charcoal sleeve cuff"). new: the thing to draw, fully: which hand, where, palm, the four fingers, the thumb, "exactly…

ParameterTypeDescription
box *array
image_path *string
instruction *string
new *string
old *string
margininteger
out_dir
scaleinteger
seeds
target

erase_background

Remove people or stray things from a still's background WITHOUT a reroll ("Do NOT reroll. Just erase them."): each box is filled, Klein paints the room into it, and only the box is pasted back. boxes: one per thing, tight, never touching anyone who stays. room: what each box should become, in words. fill: "flat" (ring color; for figures at the back of a room) or "above" (the rows above, mirrored; for a small patch on vertical bands, where flat came back flat). Check the result with compare_versions.

ParameterTypeDescription
boxes *array
image_path *string
fillstring
out_dir
roomstring
seedinteger

take_author_edit

The author fixed a picture himself: take ONLY what he changed onto the lossless picture. His copy often arrives compressed (a pasted preview), which differs a little everywhere. This takes the STRONG changes (his real edits: a finger stub, a hand, a smile -- found exactly, nothing else, on three of his edits) and pastes only those, so the rest stays exactly the lossless base. It also lists `weaker` changes it did NOT take: a soft edit (an orange rim light he removed from a sleeve) looks like compression on fine carving there. zoom_grid each weaker one; if it is his, call a…

ParameterTypeDescription
base_path *string
edited_path *string
out_path *string
regions

shrink_feature

Make a drawn feature smaller with its own pixels -- a smile, a mouth -- when Klein keeps redrawing it at the same size. The same strokes, same curve and weight, at `factor` (0.8 = 20% smaller). box: around the feature; core: a small box in its middle (only strokes through it count, so a jaw outline beside a mouth is left alone). original_path: when the feature came from a box edit, everything else is taken from this original -- the redraw had moved the jaw and chin by a pixel or two, and the author saw it. center: where the feature's center should sit, if it should move.…

ParameterTypeDescription
box *array
core *array
factor *number
image_path *string
out_path *string
center
original_path

mirror_hand

Turn a hand drawn as the wrong one (a left where a right should be) by mirroring THE HAND ITSELF across its own length, wrist to fingertips -- the author's fix. Then fix_box the WRIST only, so it joins the cuff. zone: [x0, y0, x1, y1] around the hand down to the cuff. base_rows: [y0, y1], the rows just above the cuff (the mirror line starts at the middle of the skin there). tip_rows: [y0, y1] across the fingertips. Mirroring the whole picture does nothing for this, and neither does asking Klein for the other hand. start_row: rows above it stay exactly as drawn -- set it ju…

ParameterTypeDescription
base_rows *array
image_path *string
out_path *string
tip_rows *array
zone *array
shift
start_row

zoom_grid

One region of one or more pictures side by side, enlarged, with a grid in the pictures' own pixel coordinates. Measure every box here before an edit, and compare takes here -- never by reading the whole picture, which costs many times more.

ParameterTypeDescription
box *array
image_paths *array
out_path *string
scaleinteger

compare_versions

Where two versions of a picture differ (box of every pixel changed by more than 12 of 255), with an optional heat map. Run it after every repair: it is how a redraw that also moved a jaw line was caught.

ParameterTypeDescription
a_path *string
b_path *string
heat_map_path

check_status

Check whether both ComfyUIs are reachable: Klein's (rendering) and the main one (matting). The bible and compose_panel work without either.