Still2Rig PSD
Turn one static anime character image into a structured, QA-checked PSD with an AI coding agent, See-through on Google Colab or your own GPU, and a built-in motion preview.
!Still2Rig PSD WebUI showing a layered character and motion controls
Load a generated PSD in the built-in WebUI to check eye and mouth states, automatic blinking, hair and full-body motion, positioning, and zoom. While working in OBS, you can also switch expressions from Stream Deck, Shortcuts, or curl. See external expression controls.
Still2Rig PSD is designed to be used from an AI coding agent. Attach an image, ask the agent to convert it, and the agent prepares the run, runs See-through, verifies the returned files, assembles the PSD, and reports the result. The quick start below uses Codex with a user-approved Google Colab session. With Colab, you remain in control of Google sign-in, the Chrome profile, GPU selection, and Colab connection approval. It works with Codex, Claude Code, and other AI coding agents, and See-through can run on your own GPU instead of Colab. See "Using another agent or a local See-through" below. You can also skip See-through and build the PSD with Codex image generation; see "Making a PSD with Codex image generation" below.
Status: v0.1 alpha. A single neutral image cannot reliably provide real
closed-eye and alternate-mouth artwork. Still2Rig PSD reports missing
expression art instead of presenting a placeholder as production-ready.
What it uses
- See-through for semantic
- Colab MCP Go for local,
- Local tools for hash verification, layer cleanup, deterministic PSD assembly,
- A built-in WebUI for blink, mouth, body, hair, drag, and zoom previews, plus
Using another agent or a local See-through
The steps in this README are written for Codex with Google Colab, but neither is required. It works with Codex, Claude Code, and other AI coding agents, and See-through can run on your own GPU instead of Colab.
- Agents other than Codex (Claude Code, for example): the workflow is
.agents/skills/still2rig-psd/SKILL.md and AGENTS.md. Ask your
agent to read both files and convert your image to a PSD. To use Colab,
register scripts/start-colab-mcp.sh as an MCP server with the same settings
as .codex/config.toml. How you register it depends on the agent.
- Local See-through: to run See-through on your own GPU instead of Colab,
Making a PSD with Codex image generation (no See-through)
You can also build the PSD without See-through, using Codex's built-in image generation. This route needs neither Colab nor a GPU. Codex draws the parts hidden behind the front hair and other front parts, and the local tools split the layers by comparing those drawings with your image.
- What you need: Codex with built-in image generation. Other agents can
- What is sent: your image and crops of it go to Codex image generation.
- How to ask: attach the image and say, for example, "Make a PSD from this
Codex marks a few points by eye (eyes, brows, ears, mouth, nose, chin, hair part, bang tips, collar, and a box for glasses or a hat). It then generates the images the split needs, one at a time:
- The image with the front hair, glasses and hats removed
- The head with all hair removed, showing the hidden skin, neck and clothing
- The back hair hidden behind the face
- A flat color map showing which part each visible pixel belongs to
- A flat color map of the eyes, brows, nose and mouth
- Closed eyes and an open mouth (and a closed mouth when the image lacks one)
motion-qa as in the See-through
route.
Limits: front-facing bust-up images work best. Small differences can remain at the edges of generated parts, such as a one-pixel shift along the mouth line. Check the preview before you use the PSD.
Quick start
1. Install the requirements
- Codex CLI, IDE extension, or desktop app
- Node.js 20.19 or newer
- Python 3.9 or newer with Pillow
- Go 1.25 or newer
- A Google Colab account with an L4 runtime available
npm install
python3 -m pip install -r requirements-local.txt
go install github.com/shinshin86/colab-mcp-go/cmd/[email protected]
npm run doctor
Make sure $(go env GOPATH)/bin is on PATH before starting Codex.
The install command pins the Colab MCP Go revision tested by this project.
2. Start Codex in this project
Open the project root in Codex and trust the repository-scoped
.codex/config.toml. Restart Codex once if the Colab MCP tools do not appear in
the current session. The project does not require changes to your global Codex
configuration. Its bridge selects an available localhost port automatically,
so it can coexist with a Colab MCP process started by another Codex project.
Colab MCP Go itself is not bundled in this repository. The project configuration
starts the separately installed colab-mcp-go command when needed. It does not
discover or attach to an already-running global process; it starts a dedicated
process on an available port. Other Colab MCP processes can remain running. A
Codex restart is needed only when loading a changed MCP configuration into the
current session, not for every PSD conversion.
3. Attach an image and ask Codex
Attach a PNG, JPEG, or WebP anime character image, or provide its local path, then use a request such as:
Use $still2rig-psd to convert this static anime character image into a verified
layered PSD through my approved Google Colab session. Continue through import,
PSD assembly, and QA, then tell me how to open the preview.
Codex then:
- Copies the image into the Git-ignored work area and records its SHA-256 hash.
- Generates the exact upload, setup, inference, and download cells.
- Shows a tokenized Colab URL and waits for your connection approval.
- Runs a pinned See-through revision on the approved L4 runtime.
- Verifies the downloaded bundle, cleans the layers, assembles the PSD, and
- Reports the PSD path, QA result, and any expression or motion work still
When Colab downloads the result ZIP in your browser, Codex may ask for its local path if it cannot locate the download automatically.
The Colab URL contains a connection token. Do not publish it, share it, or include it in screenshots.
4. Preview the PSD
Start the built-in local preview:
npm run preview
Open the printed local URL. The WebUI lists generated PSDs from
.still2rig-psd/jobs/*/output/, selects the newest result, and also accepts a
local PSD through file selection or drag-and-drop. For a generated PSD,
Open save location opens its output folder in the operating system's file manager.
New PSDs open with Still2Rig PSD Runtime. You can switch to the original
Anime2.5D motion in the preview or use the standalone browser package. To display the avatar on your own site, build the static
player with npm run preview:build and place the PSD alongside embed.html.
See the iframe example and deployment instructions.
Before any PSD is open, 画像から新しくPSDを作る copies a conversion request for Codex or Claude Code; paste it into the agent and add the image file's location on the last line. The preview remembers which agent you chose. The Fix overlaps mode supports alpha-aware canvas selection, offers candidates when multiple parts overlap, moves parts forward or backward, compares the edit with the source, supports detailed mouse-based drag sorting on desktop, and downloads a verified copy without overwriting the original PSD. Touch-based layer sorting on phones is not supported.
5. Prepare closed-eye and open-mouth artwork
In the preview, number keys 1–9 (including the numeric keypad) switch expressions in button order; each button shows its number.
For a generated PSD, 表情の絵を作ってもらう in the preview groups requests by expression button and shows which drawings are already present. Both the panel and its expression list start collapsed, with a count of expressions missing art. Missing artwork is selected initially. Existing expressions offer 作り直す with an optional note. Redrawing shared art also changes other expressions that use it; for example, smiling eyes are shared by joy and wink. With Codex, the panel explains that face crops are sent to Codex image generation, and copying the request records that agreement. One request covers all selected expressions: generate one image per drawing, accept the first that passes import checks and visual review, and retry a failed drawing at most twice. Skip any drawing that still fails, preserve its previous art, and continue with the others. Import accepted drawings together and finish with one overview, retry/skip reasons, and test results. No candidate selection is needed between expressions. With Claude Code, which cannot generate images, the request prepares all files and explains what to send to an approved image generator and where to save each result. After those images are available, it performs the same review and import flow. PSDs opened from your computer do not have the conversion data this needs, so the panel only explains that.
You can also run the commands directly:
npm run still2rig-psd -- expression-requests demo --only eyes_sad,mouth_frown
After consent, generate one image using each input.png, mask.png and prompt.txt.
Save results/eyes_sad.png and results/mouth_frown.png.
Check each image without changing the PSD; inspect its exported preview too.
npm run still2rig-psd -- import-expressions demo --only eyes_sad --read-only --preview-dir .still2rig-psd/review/demo/eyes_sad
npm run still2rig-psd -- import-expressions demo --only mouth_frown --read-only --preview-dir .still2rig-psd/review/demo/mouth_frown
When both pass checks and visual review, import them together.
npm run still2rig-psd -- import-expressions demo --only eyes_sad,mouth_frown
npm run still2rig-psd -- repair demo --expressions .still2rig-psd/jobs/demo/generated-expressions
Inspect whether each image reads as the intended expression, matches the original
style, line weight and colors, avoids duplicate eyes/brows/mouths, and adds nothing
outside the requested region. Keep requests and their recorded hashes unchanged
until all images have been reviewed and imported. --only limits validation and
replacement to the named drawings, preserving other imported art. If an image
fails after two retries, omit it from the final import list; if none pass, skip
repair and report the reasons. Never weaken checks to accept an image.
expression-candidates and import-expressions --pick remain available for
optional numbered comparisons and development. Read-only review does not change
the source PSD, manifest, or imported artwork. --preview-dir selects a review
directory under .still2rig-psd/ outside the source data; --request-dir selects
archived requests. Passing import checks alone does not establish visual quality.
Requests use a face crop of the current PSD layers, including the latest repair,
with front hair and head accessories hidden. Import removes pixels matching the
face underlay and restores only the new expression artwork to the PSD canvas. It rejects changed
layers, wrong proportions, global misalignment, or excessive changes in the
opaque band around the editable area. Drawn artwork
remains the first choice. Generated art must pass the existing expression QA and
visual review; importing it does not establish readiness.
repair automatically reuses layer overrides from the preceding repair and
reports what it inherited. Use --no-layer-overrides to deliberately drop them.
If a legacy repair's overrides cannot be found, repair stops and asks for an
explicit directory or removal instead of discarding corrected layers.
Automation and consent boundaries
| Codex handles | You control | | --- | --- | | Preparing the local run and generated notebook cells | Choosing the Chrome profile and Google account | | Running See-through after connection approval | Opening the Colab URL and selecting an L4 runtime | | Verifying the returned archive and hashes | Approving the Colab MCP connection | | Cleaning layers, assembling the PSD, and running QA | Deciding when to disconnect or delete the runtime | | Reporting the output and preview command | Providing real expression artwork when the source image does not contain it |
Still2Rig PSD does not automate Chrome, sign in to Google, select an account, allocate a runtime, edit global Codex settings, or disconnect a Colab runtime.
Output structure
Every run is stored under the Git-ignored .still2rig-psd/jobs/
directory:
.still2rig-psd/jobs/<name>/
input/ copied source image
colab/ generated notebook cells
raw/imported/ verified See-through result
processed/layers/ cleaned full-canvas layers
output/<name>.psd assembled PSD
reports/ contact sheet and QA reports
job.json hashes, settings, and provenance
Input art, generated PSDs, Colab tokens, logs, screenshots, videos, model weights, and downloaded archives are ignored by Git by default.
Quality checks and limitations
The CLI reports the first two cumulative levels below after finalize or
repair. The third level comes from motion-qa, which records the built-in
preview renderer against configs/motion-qa-contract.json.
| Level | Meaning |
| --- | --- |
| Structure checked | The PSD was written in the configured order and structural QA passed its required layers and critical front/back relationships. Hashes are verified separately by the workflow. |
| Mouth/closed-eye files checked | mouth_open and eye_close are present, are not built-in placeholders, and passed registration and numeric mouth checks. Visual review is still required. |
| Motion checked by an adapter | motion-qa recorded the built-in preview renderer and every declared motion check passed. Other renderers are not covered. |
The default back-to-front order is back hair → lower-body clothing → arms →
upper-body clothing → neck → ears → face → eyes, brows, nose, and mouth →
front hair → headwear. Keeping
side-positioned arms behind clothing prevents shoulder edges from crossing the
shirt. A hand crossing in front of the shirt needs separate back and front
artwork; one arm layer cannot represent both depths.
If the source does not show an open mouth or closed eyes, those states cannot be
determined reliably. --preview-placeholders is only for exercising the
controls and is not treated as real expression art. Prefer drawn expression
files, or files made with an image generation tool, passed with
--expressions. When neither is available, derive-expressions can draw a
stopgap open mouth and closed eyes from the neutral layers; passed with
--preview-expressions, they appear in the preview but keep
productionReady=false.
See Understanding the generated PSD for the exact layer contract, required expression files, and what each reported level proves. Still2Rig PSD does not claim one-click Live2D production readiness.
Direct CLI
The repository skill normally runs these commands for you. They are also available for debugging or manual operation:
npm run still2rig-psd -- prepare ./character.png --name demo
npm run still2rig-psd -- colab-url
npm run still2rig-psd -- status demo
npm run still2rig-psd -- import demo /path/to/still2rig-psd-demo.zip
npm run still2rig-psd -- finalize demo --expressions /path/to/expression-layers
npm run still2rig-psd -- repair demo --expressions /path/to/repaired-expression-layers
npm run still2rig-psd -- derive-expressions demo
npm run still2rig-psd -- repair demo --preview-expressions .still2rig-psd/jobs/demo/preview-expressions
npm run still2rig-psd -- motion-qa demo
repair reuses the verified imported result without rerunning Colab. It backs
up the current PSD and reports under the ignored job directory, rebuilds in an
isolated repair directory, runs structural QA, and replaces the previewed PSD
only after the repaired build succeeds.
Security and privacy
- The Colab MCP bridge listens on localhost and requires a random connection
- The source image and generated cells are sent to the user-approved Colab
- The built-in preview listens on
127.0.0.1and serves only known generated
- Imported ZIP files are treated as untrusted and checked for traversal,
- Do not publish source art or generated assets unless you have the necessary
See Security, privacy, and consent for the full trust model.
Licensing
Still2Rig PSD is MIT licensed. See-through and Colab MCP Go are separate
Apache-2.0 projects. The preview redistributes the MIT-licensed Anime2.5DRig
rigger.js runtime with its license text. Model weights downloaded by upstream
tools may have additional terms.
See NOTICE.md for third-party notices.