Building an AI Comic-Strip Creation App from Scratch: Cost Control and Character Consistency Techniques

    This article walks through the end-to-end development of a mobile AI comic-strip (manhua) creation app, from concept to MVP. It covers the full pipeline—turning a one-sentence idea into a script, consistent characters, scene images, storyboard videos, and a final comic video—using LLM-powered coding tools, Flutter, and cloud-hosted AI microservices. Key techniques for maintaining character visual consistency across panels, prompt engineering for structured script generation, and a detailed cost breakdown (approximately $3 USD total for development and runtime) are discussed, along with best practices, risk considerations, and future outlook for on-device AI content creation.

    1. Background and Motivation: The Mobile Gap in AI Comic Creation

    AIGC capabilities in image, video, and script generation have advanced rapidly in recent years. Comic strips—a format that blends narrative, storyboard, and audiovisual elements—are gaining traction among both creators and audiences. However, most existing comic-generation tools are desktop-oriented web applications. The mobile creation experience is virtually nonexistent, meaning creators cannot turn inspiration into visual work on the go.

    To address this gap, I surveyed the landscape and decided to build a mobile comic-creation MVP from scratch, using an LLM-driven coding assistant as a “programming partner.” The core goal: support the full pipeline from “one-sentence idea → script → character → scene → storyboard images → storyboard videos → complete comic video.” The development cycle was roughly 8 days (excluding holidays), achieving high cross-panel character consistency while keeping total development and runtime costs extremely low.

    2. Tech Stack and Architecture Overview

    2.1 Role of the LLM Coding Assistant

    This project relies heavily on a large language model as a coding companion. By describing requirements in natural language, the model generates code scaffolds, debugs errors, and refactors structure—enabling a solo developer to complete full-stack work in a very short time. The LLM does not replace developer judgment; it compresses repetitive coding so the developer can focus on business logic and UX polish.

    2.2 Overall Architecture

    The app uses a decoupled front-end/back-end architecture:

    • Front-end (mobile): Built with Flutter for cross-platform support (Android and iOS), handling script editing, character setup, storyboard preview, and video composition.
    • Back-end (cloud): Hosts LLM inference, image generation, video synthesis, and user data storage, coordinated through an API gateway. Inference models run in Docker containers, with Alibaba Cloud’s RocketMQ message queue for async task scheduling.
    • AI layer: Encapsulates text generation (script planning), image generation (consistent character/scene images), video generation (animating storyboard panels), and TTS (narration) as independent microservices.
    1. [User Idea] → [LLM Script Planning] → [Character/Scene Setup]
    2. ↓ ↓
    3. [Image Gen API] ←── [Consistency Module] ──→ [Storyboard Images]
    4. ↓ ↓
    5. [Video Gen API] → [Panel Videos] → [Video Compositor] → [Full Comic]

    2.3 Cloud Infrastructure

    The back-end runs on cloud infrastructure including object storage (OSS, for generated images and videos), container services (ACK/K8s, for deploying inference models), message queues (async scheduling), and logging/monitoring. Pay-as-you-go, elastic scaling is what makes rapid, low-cost validation possible.

    3. Core Technical Challenges and Solutions

    3.1 Character Consistency: The Quality Lifeline

    Keeping a character’s face, clothing, and body consistent across panels is the biggest challenge in AI comics. This project uses three quantified strategies:

    1. Character Anchor Description: After generating an initial character image, key visual features are extracted into a structured “character card” with fields: character_name, hair_style, skin_tone, clothing_detail, body_type, facial_landmarks. Every subsequent generation uses this as a constraint.
    2. Reference Image Injection: The Stable Diffusion IP-Adapter interface is called with the initial character image as a reference, guiding the model to vary pose and expression while preserving core features.
    3. Iterative Validation: Generated results are automatically checked with SSIM similarity (threshold ≥ 0.85); below-threshold results trigger regeneration. On 50 test samples, cross-panel consistency reached 82%.

    3.2 From One Sentence to Structured Script

    Given input like “a girl searching for a lost letter in a rainy ancient town,” the system performs:

    1. Intent and style analysis: The LLM identifies genre (healing/suspense), emotional tone, and target audience.
    2. Structured script generation: Expands into a JSON script with scene number, visual description, character action, dialogue/narration, and camera direction. Reusable prompt template:
    1. {
    2. "title": "Rainy Ancient Town",
    3. "genre": "healing",
    4. "scenes": [
    5. {
    6. "scene_id": 1,
    7. "duration": "4s",
    8. "visual": "Girl holding an umbrella at the entrance of a bluestone alley, raindrops on the canopy",
    9. "character_action": "Girl looks down, rummaging through her backpack",
    10. "dialogue": "Narrator: She searched for that letter all summer",
    11. "camera": "Medium shot, slow push-in"
    12. }
    13. ]
    14. }
    1. Storyboard planning: Auto-determines panel count, 3–5 second duration per panel, and fade-in/fade-out transitions.

    3.3 Animating Storyboard Images into Video

    Static panel images are converted to short video clips via an image-to-video model (e.g., Runway Gen-2). Recommended settings: motion intensity 0.3–0.5 to keep footage stable while adding natural movement (camera push, falling rain). Each clip is 3–5 seconds; the compositor stitches them into the final comic video.

    3.4 TTS and Language Configuration

    The project integrates Volcano Engine TTS. The initial version omitted the language parameter and defaulted to non-Chinese output. Setting language: "zh-CN" and voice_type: "female_warm" fixes this. Note: TTS services involve voice licensing and content compliance—building a content review pipeline is advisable.

    4. Cost and Efficiency Optimization

    4.1 Token Consumption Breakdown

    LLM calls fall into two phases:

    • Development: Qwen-max (Tongyi Qianwen) generated code and debugging—~120 calls, ~1.8 million tokens. At ¥0.004/1K input tokens and ¥0.012/1K output tokens, this cost ~¥9.
    • Runtime: GPT-4o-mini produced scripts for 30 comics—~600K tokens, ~¥6.

    The two sum to ~¥15, plus ~¥5 for cloud storage and compute, for a total of roughly ¥20 (October 2024, 8-day cycle).

    4.2 Keeping Costs Low

    Pay-as-you-go cloud billing and cost-effective inference models have made it feasible for individual developers to validate ideas at near-zero cost. However, the above figures reflect small-scale testing; as user volume grows, token and compute costs will scale linearly, so usage monitoring should be in place from day one.

    5. Lessons Learned and Best Practices

    1. Start with MVP thinking: Run the core pipeline first; refine language, quality, and other details later.
    2. Prompt engineering matters: Well-crafted character-card fields and JSON script templates significantly boost output quality.
    3. Async and fault-tolerant design: AI tasks are slow and may fail; use message queues with retry logic to avoid blocking the user experience.
    4. Modular AI services: Wrap text, image, video, and TTS into independent microservices for easier upgrades and cost tracking.
    5. Visualize costs: Monitor token and resource usage from the start with a dashboard to prevent bill shock.

    Risk Notes:

    • AI-generated content copyright: Clear legal precedent on ownership of AI-generated works is still evolving in many jurisdictions. Define rights boundaries in your user agreement.
    • User privacy compliance: If the app lets users upload reference images, comply with applicable data-protection laws, encrypt data, and minimize collection.
    • Content moderation: AI-generated content may include sensitive material. Integrate third-party content-safety APIs and establish a human review process.

    6. Outlook

    This project demonstrates a clear trend: with LLMs and AI-powered coding tools, individual developers can rapidly build vertical AI applications. As multimodal models improve and on-device inference becomes mainstream, mobile AI comic creation will become smoother and more real-time—potentially enabling “speak-and-draw” interactions. Seizing this technical momentum to turn ideas into products is one of the most rewarding directions for developers today.