Dalian Works
aifilm

The imgstyle Field: A Switch for Four Art Styles from Realistic to Period Anime

Published 2026-11-02 · Translated from the Chinese original

In AI video generation controls, art style is often the hardest part to keep consistent.

Different shots are generated in different batches, and with even slight fluctuations in the prompts, the visual style can easily drift.

In this system, however, art style is compressed into a single field, imgstyle, with only four values: xs, gz, dm, and xd, corresponding to realistic, period costume, anime, and modern, respectively.

This field is automatically populated by article.atctype when the novel is entered. Every entry in dbvideo_article carries a clear label—for example, "Five-Element Dragon Banner" is set to gz for period costume, while "Miao Ba Zi Superbody" can be set to xs for realistic.

From that moment on, all downstream stages in the entire pipeline—character image generation, location image generation, scene synthesis, and first-and-last-frame generation—read this imgstyle field and select different model weights or style presets based on its value.

Let's illustrate the effect of this switch with a specific scene.

Suppose we have the same shot: Lin Xuan stands at the foot of Cangwu Mountain, looking up at the distant peaks.

When imgstyle is xs, i.e., realistic mode, drawrole generates the character image using a high-resolution portrait model—skin texture is fine and detailed, and lighting follows natural physical rules.

The Cangwu Mountain background in places.aiwords is rendered with realistic weights; the rock layers of the mountain are clearly defined, clouds drift in the sky but with a true-to-life tone, and the folds of the character's clothing and the light projection all simulate the effect of a real camera.

When imgstyle is switched to gz, period costume mode, drawrole reads this field and switches to a period-costume character model. The prompt automatically appends an ancient-style clothing description; even if the original text doesn't specify what the character is wearing, the system generates it based on default Tang-Song dynasty clothing logic.

For the location image, in period mode, Cangwu Mountain is rendered with an ink-wash shading background, the mountain contours lean more toward a traditional Chinese painting style, and the overall tone shifts toward warm yellow or blue-gray.

In the same shot, after the imgstyle field is written, the generated first frame shows Lin Xuan's stance changing from a realistic, balanced posture to a theatrical T-step stance, with the robe sleeve angles deliberately exaggerated, carrying the aura of a wuxia film.

When imgstyle is switched to dm, anime mode, the model weights shift to a two-dimensional cartoon style. drawrole generates Lin Xuan with simplified facial features, enlarged eyes, blocky highlights on the face, and thicker, crisper hair lines.

The location image uses cel-shaded coloring: the trees and rocks of Cangwu Mountain have clear black outlines, and the sky is filled with large flat color blocks without subtle transitions.

The last frame in arcpictask inherits the same style setting, so the first and last frames maintain a high degree of visual consistency in art style.

BODY:

When imgstyle is set to xd, modern mode, everything shifts back to an urban style. Even if the original text doesn't explicitly describe a modern setting, the system will generate a city-edge background for Cangwu Mountain—for example, a highway or an electric tower appearing at the foot of the mountain. The character's clothing defaults to a windbreaker or jacket, and the lighting in the location image comes from neon signs or streetlights in a modern environment.

Across these four styles, the character image, location image, scene composite image, and first-and-last frames inherit the style sequentially—no layer ever escapes the control of this single switch.

The implementation logic behind this is not complicated.

The two image-generation functions, drawrole and placeaiwords, receive parameters that include not only the prompt and reference images but also an imgstyle value.

When calling the underlying large-model API, this value is submitted along with weight parameters and style presets to the model channel.

The model channel binds a uid per CRTOR, and each uid corresponds to a tuned combination of models.

When imgstyle is xs, the uid points to the realistic model, with sampling steps and CFG values set to the recommended realistic parameters, and the prompt automatically includes fixed phrases such as rich texture, natural light, and detailed surface.

When imgstyle is gz, the uid points to a different period-costume model, and the prompt includes preset phrases such as cloud patterns, sword, long robe, and ink-wash background.

When imgstyle is dm, the uid points to the anime fine-tuned model, and the prompt includes fixed phrases such as clean outline lines, exaggerated character expressions, and vivid color palette.

When imgstyle is xd, the uid points to the modern urban model, and the prompt includes fixed phrases such as modern architecture, simple clothing, and urban lighting.

Every image-generation call carries this imgstyle, and once set, imgstyle does not change within the scope of a single book—unless a specific chapter intentionally adopts a different style.

The most direct advantage of this single-field control is that there's no need to build a separate production system for each art style.

Using the traditional approach, you would either have to handwrite style descriptions repeatedly in prompts, or maintain four separate database tables, four sets of prompt templates, and four image-generation APIs for the four styles.

Here, the approach is to record the style in atctype at the Article layer, with imgstyle serving as a shared field that runs through the entire pipeline.

The team can simultaneously produce multiple works of different styles. As long as different bookcodes are established in dbvideo_bookidx, and each book's articles carry their own imgstyle, three computers can alternatively handle tasks of different styles without interfering with one another.

When changing styles, there's no need to retrain models—simply change the value of the imgstyle field, and the entire generation process will adopt different presets.

BODY:

It should be noted, however, that switching imgstyle affects all subsequent image generation—it does not affect already-generated data.

If you are making a film composed of four chapters, with the first three chapters in realistic style and the fourth chapter switched to anime, you simply set article.atctype for the fourth chapter to dm, while keeping the first three chapters at xs. In this way, different chapters within the same film can have different art styles, provided that each chapter is clearly distinguished during entry.

The system has no mandatory global style constraint—each article determines its own style.

In practice, the real simplification this switch brings is in workload.

Say you are producing all 1,029 shots of a full film. If you manually add a phrase like "realistic style" or "period costume style" to every image prompt, you not only risk missing some, but also suffer from unstable style wording—for example, one person writes "ancient style," another writes "old era," and a third writes "ancient China." Differences among synonyms lead to different generation results.

imgstyle fixes the style semantics with a single enumerated value. Each value corresponds to a preset word list and a set of model parameters, and every call based on that value uses the same word list, ensuring that every image in the book strictly follows the same style standard.

When the system generates a character image, it reads imgstyle. No matter how many times drawrole is called within the same book, the art style remains consistent, because every call reads the same field and the same preset.

When replacing an actor or redoing a specific shot, you only need to modify part of the character description and the appearance field in dbvideo_roles, then rerun drawrole—this does not affect other shots.

This is because imgstyle is a common factor across all image-generation tasks and is not impacted by rerunning a single shot.

In the final output inspection, all four art styles passed the quality check.

When imgstyle is set to gz, the four chapters of the finished film—Five-Element Dragon Banner, Miao Ba Zi Superbody, Miao Ba Gua Superbody, and Jia Bu Yi Superbody—all adopt the period costume style, with the overall tone uniformly presenting a blend of rice-paper yellow and ink black.

If a certain plot suddenly introduces modern props, they are automatically converted to ancient equivalents in period mode—for example, a mobile phone becomes a carrier pigeon message, and a car becomes a horse-drawn carriage.

In xd modern mode, the mechanical and high-tech elements in the original text can be fully reproduced: firearms, computers, robotic arms, and similar items fit naturally into the contemporary urban environment.

In dm mode, the character relationships from the novel are preserved, but the visual presentation becomes cartoonish, with more exaggerated expressions and more dramatic action design.

All four styles share the same storyboard table and the same character and location tables, truly achieving the efficiency of "change one field, change one worldview.

BODY:

This is the core answer to achieving multi-style management at the engineering level—not a more complex system, but more simplified control.