Portrait motion
One finished sprite in. Eyes and mouth a game can drive separately out.
portrait-motion · Page · Contract
The face is found and cropped, a reviewer decides which eyes and mouth can safely change, and an image model draws every new state in one sheet. Each drawing is aligned to the original, every combination is reviewed, and the accepted patches go back on the sprite at full size.
Steps
| Step | Node types |
|---|---|
| Check the inputs The spec is read and the portrait held to it before anything is paid for: a face crop needs a square canvas; a portrait animated whole must be opaque and exactly the canvas. | Check the inputs portrait_motion/check |
| Find the face A vision model returns only a box around the face; it never judges whether the face can move. The workspace is cut from the full sprite with padding on every side and resized once to the spec's canvas. | Locate the face portrait_motion/face/locateCheck the box portrait_motion/face/locatedCrop the face portrait_motion/face/crop |
| Decide and draw A reviewer decides which eyes and mouth can safely change. The image model then draws every new state in one sheet, each cell an edit of the same portrait, so they share one hand. | Decide what can move portrait_motion/draw/admissionCheck the decision portrait_motion/draw/admittedLay out the sheet portrait_motion/draw/guideWrite the questions portrait_motion/draw/briefsDraw the new states portrait_motion/draw/atlas |
| Fit Each new drawing is aligned to the original, and one that moved or changed scale is refused. A vision model outlines the eyes and mouth that may change. | Line them up portrait_motion/fit/registrationOutline eyes and mouth portrait_motion/fit/geometryCheck the outlines portrait_motion/fit/geometry_ok |
| Compose and review Every eyes-and-mouth combination is built from those outlines, then judged by a reviewer that did not draw them. | Build every combination portrait_motion/compose/compositionReview the result portrait_motion/compose/qualityCheck the review portrait_motion/compose/quality_ok |
| Deliver Only accepted features are kept, and the result says which, or where the run refused and why. With a face crop, the patches go back on the original sprite at full size, and every pixel outside them is checked unchanged. | Record the result portrait_motion/deliver/resultKeep what passed portrait_motion/deliver/keepPut it back at full size portrait_motion/deliver/render |
Outputs
| outputs/animation.webp | The timeline at the sprite's full size, transparency kept |
| outputs/states/ | Every eyes-and-mouth combination, as full-size PNGs |
| outputs/patches/ | Each eye and the mouth in every state, as patches placed at one offset |
| outputs/manifest.json | Where the patches go, which feature each belongs to, and a sample timeline |
| outputs/result.json | Which features were accepted, or where the run refused and why |
Try it
An original geometric character, as a full sprite and as an opaque portrait, with the inputs that use them, written by uv run python src/fx_games/workflows/portrait_motion/inputs/make_inputs.py out/portrait-motion-input. The run is paid: it needs OpenRouter and OpenAI keys, and --live
uv run python -m grida.fx plan portrait-motion --inputs out/portrait-motion-input/face.yaml uv run python -m grida.fx run portrait-motion --inputs out/portrait-motion-input/face.yaml --live --max-usd 5 uv run python -m grida.fx inspect portrait-motion
Examples
| Yuzu face | yuzu-face | made with an earlier version |