Making Consistent AI Animation with Codex: 5-Step Workflow That Stops Character Drift (with a Complete Project File Structure)

8/22/2026 CodexSeedanceJimengAI animationvideo productionconsistency

# Making Consistent AI Animation with Codex: 5-Step Workflow That Stops Character Drift (with a Complete Project File Structure)

The most maddening thing about AI animation is character drift, and most people blame the model. After running 8 shots, I found the problem isn't the model — it's the division of labor.

This tutorial makes that division of labor concrete: it breaks "story → screenplay/storyboard → prompts → reference images → video" into a pipeline that lives in files. Codex decomposes the task and produces the storyboard plus two sets of prompts; Jimeng (Seedance) image-to-video brings each reference image to life. Follow these 5 steps and even a roughly 30-second, 8-shot 2D hand-drawn anime short will keep its characters consistent.

TL;DR: 5-step workflow — ① put the story in input/article.md → ② Codex produces the screenplay and storyboard → ③ split out two kinds of prompts, "image prompts" and "video prompts" → ④ generate the reference images first → ⑤ feed each "reference image + its matching video prompt" into image-to-video, shot by shot. The image prompt decides what the frame shows; the video prompt decides how the frame moves. Feed them separately, and characters won't drift.

The cover of the finished 2D hand-drawn anime short produced with this workflow — the characters stay consistent across all 8 shots

Table of contents:

  1. Prepare your tools
  2. Why a "one-shot" generation goes wrong
  3. Understanding the project structure first
  4. Step 1: put the story into input/article.md
  5. Step 2: generate the script and storyboard first
  6. Step 3: generate image prompts and video prompts separately
  7. Step 4: generate the 8 reference images first
  8. Step 5: reference image + matching prompt generates the video
  9. Final checks and output
  10. Pitfalls to avoid
  11. FAQ

# Prepare Your Tools

  • Codex (OpenAI): reads the story, writes the screenplay and storyboard, and produces the two sets of prompts. You need a ChatGPT account with Codex credits (for how to choose a credit tier, see Codex credit comparison (opens new window); for top-ups, see the end of this article).
  • Jimeng (Seedance): image-to-video — brings each reference image to life.
  • The copy-paste prompts provided for every step in this article.

# Why a "One-Shot" Generation Goes Wrong

Throwing the story, storyboard, visuals, and motion at the model all at once and asking it to generate a finished video in a single pass most easily leads to three problems: inconsistent characters, discontinuous shots, and a style that keeps drifting.

The real problem is the division of labor, and it has nothing to do with how good the model is. When one model has to manage "story, storyboard, visuals, and motion" at the same time, it inevitably neglects one at the expense of another. So this article takes a different approach: first build a complete project file structure, then generate the story, storyboard, reference images, and videos separately.

# Understanding the Project Structure First

This is the foundation of the whole method. Here's the directory tree:

project/
│
├── input/
│   └── article.md
│
├── script/
│   ├── story-analysis.md
│   ├── screenplay.md
│   └── storyboard.md
│
├── prompts/
│   ├── image-prompts.md
│   └── video-prompts.md
│
├── images/
│   ├── scene01.png
│   ├── scene02.png
│   ├── scene03.png
│   ├── scene04.png
│   ├── scene05.png
│   ├── scene06.png
│   ├── scene07.png
│   └── scene08.png
│
├── videos/
│
└── output/
    └── final.mp4

The actual project folder structure in the file manager: the six directories input, script, prompts, images, videos, output

The point of this structure is to split "story, storyboard, visuals, and video" into distinct stages. AI no longer does everything in one pass — each step handles exactly one thing, and everything lives in a file that can be checked, edited, and reused.

The overall directory tree output by Codex — six directories with clear responsibilities

# Step 1: Put the Story into input/article.md

Put the raw story into input/article.md. This file is the input of the whole project. It isn't fed straight into video generation — it's handed to Codex to decompose.

The raw story in article.md, the Codex project input file

Then give Codex this one key prompt:

Read ./input/article.md.

Adapt it into an original 2D hand-drawn anime short of about 30 seconds across 8 shots.

Don't generate images or video yet. Only complete:
story analysis, character design, scene design, emotion curve, and storyboard planning.

Codex reading article.md and outputting the story analysis, character design, and storyboard plan

# Step 2: Generate the Script and Storyboard First

The screenplay at this step doesn't need to be polished — the key is that all the later images and videos share one consistent basis. Codex generates three files under script/:

script/
├── story-analysis.md
├── screenplay.md
└── storyboard.md
  • story-analysis.md: the story, characters, emotions, and visual themes
  • screenplay.md: what happens in each shot within those 30 seconds
  • storyboard.md: shot size, composition, camera movement, and changes over time

The storyboard table for the 8 scenes in storyboard.md, with shot size and camera movement annotated per shot

# Step 3: Generate Image Prompts and Video Prompts Separately

This is the conceptual focus of the whole tutorial: image prompts and video prompts must not be mixed together.

image-prompts.md handles the frame itself:

  • The character's appearance
  • Clothing
  • Environment
  • Composition
  • Style
  • Lighting
  • Negative constraints

video-prompts.md handles only the moving parts:

  • Character movement
  • The wind chime swaying
  • Hair and skirt hem movement
  • Cat movements
  • Camera movement
  • Forbid character drift and realistic rendering

The image prompt decides what the frame shows; the video prompt decides how the frame moves. That's the division of labor between the two.

A complete Image Prompt: appearance, clothing, environment, lighting, style, and negative constraints

The Video Prompt for the same scene: only character movement, environment movement, and camera movement

# Step 4: Generate the 8 Reference Images First

Generate images/scene01.png through scene08.png in order. Don't let Seedance improvise freely from the story — first lock every shot into a reference image, then let the video model be responsible for nothing more than making that image move.

Thumbnails of the 8 storyboard reference images with their scene numbers, scene01 through scene08

# Step 5: Reference Image + Matching Prompt Generates the Video

This is the core of the whole method: each reference image is paired only with its own shot's video prompt.

scene01.png + Scene 01 video prompt
scene02.png + Scene 02 video prompt
scene03.png + Scene 03 video prompt
...
scene08.png + Scene 08 video prompt

Putting the reference image and its matching video prompt into Jimeng Seedance to generate a shot

In Jimeng Seedance, choose image-to-video and drop in the reference image plus its matching video prompt. You can generate 8 clips shot by shot and then combine them, or let Codex chain the whole flow into one complete video.

The principle isn't complicated:

The Source Image decides the character and art style; the Video Prompt only handles movement and camera. Feed the two in separately, and you can significantly reduce character drift, wardrobe changes, and out-of-control style.

# Final Checks and Output

Put the generated clips into videos/, and move the confirmed final cut to output/final.mp4.

The cover of the final cut exported to output/final.mp4

Check four things before exporting:

  • Whether the characters are consistent
  • Whether the shots are continuous
  • Whether it stays 2D anime
  • Whether anything turned realistic or 3D-ified

The point of this whole flow lies in "decomposition": breaking the one-shot "generate the entire movie" task into a set of files that can be checked, modified, and reused.

# Pitfalls to Avoid

  • Codex credits: image and task generation burn through credits faster than conversation. When something fails, check your remaining quota first instead of retrying over and over.
  • The reference images set the ceiling: if all 8 reference images share one consistent style, the final cut won't fall apart; once the reference images drift, no amount of tweaking afterward can save it.
  • Don't describe appearance in the video prompt: describe only movement and camera. Repeating the character's appearance actually makes the model change the art style.
  • Shorter instructions and clearer division of labor produce steadier output: don't ask Codex to do many things at once.

# FAQ

  • q: "What's the difference between this one and the earlier 'Codex image generation + Seedance image-to-video' tutorial?" a: "The earlier one makes a single video from a single image (the Chinese-fantasy Heavenly Palace cinematic piece); this one is a multi-shot 2D hand-drawn anime short with a full storyline. The core difference lies in the file structure: story, screenplay, storyboard, prompts, and reference images are split into separate files and controlled shot by shot, which solves character drift and runaway style in longer videos."
  • q: "Is Codex required? Can I use another AI instead?" a: "The core idea is to decompose the task into checkable files. Any AI that can 'read a file → produce structured documents' (Codex, Claude, and so on) works. This article uses Codex as the example because its ability to read and write project files is the most direct; the video generation step uses Jimeng Seedance image-to-video."
  • q: "I followed the steps but the characters still drift / the frames still don't match up. What should I do?" a: "Troubleshoot by priority: ① first confirm the 8 reference images themselves are consistent in style — they set the ceiling for the final cut; ② the video prompt should only describe movement and camera, not re-describe appearance and clothing; ③ in Seedance image-to-video, always bind the corresponding Source Image; ④ give Codex shorter instructions and a clearer division of labor — one thing at a time."
  • q: "My Codex credits aren't enough, and it keeps saying 'insufficient credits' when generating. What now?" a: "Codex has a daily quota, and image and task generation burn through it faster than plain chat. When it fails, first confirm how much credit your current plan has left, and don't retry repeatedly; you can wait for the next day's reset, or upgrade your plan for higher credits."

# Closing Thoughts

If you also want to make short videos with AI, don't start from "make me a video." Start by creating a project folder: the story goes in input, storyboards in script, prompts in prompts; frames into images, video into videos, and only the confirmed final cut into output.

Once the file structure is clear, AI video stops being a matter of luck — it becomes a repeatable process where every step has a file you can check.


Need Codex credits? Check the Codex top-up page to learn about supported plans, payment methods, and how delivery works.

View Codex top-up (opens new window)

# About the Author

The UPGPTs team focuses on Chinese-language, hand-holding tutorials for AI tools like ChatGPT, Claude, Grok, and Codex — screenshots at every step. More tutorials at the UPGPTs tutorial center (opens new window); check the FAQ (opens new window) for common issues, or leave a message via the Contact Us (opens new window) page.