SuperAPI AI Directory

qwen-wanx-comic-gen

Design & creation

View repository

Updated 10-15 19:51

About this skill

Qwen Wanx Comic Generator

Use the Alibaba Cloud Tongyi Wanxiang wan2.6-t2i text-to-image API to turn the user's text description into comic / anime-style images, suitable for single-panel illustrations and simple multi-panel storyboard sketches.

When to Use This Skill

  • When the user explicitly mentions:
    • "Draw an image (draw a comic) with Wanxiang/Tongyi Wanxiang/Qianwen Wanxiang"
    • "Use Qwen to generate comic/2D/anime-style images"
    • "Help me generate a comic-style illustration"
  • When the user needs more comic/anime-style images rather than realistic photographic style, this skill can be prioritized.

How to Run

Run the script locally or on a remote host (it will automatically reuse the API Key used by the OpenClaw main model):

python3 {baseDir}/scripts/gen.py \
  --prompt "黑白分镜,四格日常校园搞笑漫画,主角是一只拟人化的小龙虾" \
  --style anime \
  --size 1280*1280 \
  --n 1

More examples:

# 生成彩色二次元人物立绘(--style 会自动添加"动漫风格"前缀)
python3 {baseDir}/scripts/gen.py --prompt "全身立绘,日系漫画风格,短发少女,背着双肩包" --style anime

# 生成黑白线稿分镜草图(--style sketch 会添加"素描风格"前缀)
python3 {baseDir}/scripts/gen.py --prompt "四格漫画分镜,办公室日常吐槽,黑白线稿" --style sketch

# 使用反向提示词,避免写实风格
python3 {baseDir}/scripts/gen.py \
  --prompt "可爱的小龙虾超级英雄,日式漫画封面" \
  --negative-prompt "photography, realistic, photo, 3d" \
  --style anime

# 不使用风格前缀(手动在 prompt 里描述风格)
python3 {baseDir}/scripts/gen.py \
  --prompt "动漫风格,Q版校园日常,小龙虾吉祥物" \
  --style auto \
  --n 2

Parameter Description

  • --prompt(Required): Chinese or English description, focusing on: characters, scene, emotion, composition, and the "comic/anime style" requirement.
  • --negative-prompt(Optional): Undesired effects, such as photography, realistic, low quality , etc.
  • --style(Optional):Style prompt(the script will automatically add it before the prompt), default anime, options:
    • anime: add the "anime style," prefix
    • flat illustration: add the "flat illustration style," prefix
    • 3d cartoon: add the "3D cartoon style," prefix
    • sketch: add the "sketch style," prefix
    • auto: do not add a style prefix (describe it manually in the prompt)
    • Note: wan2.6-t2i does not support the style API parameter; the script will incorporate style keywords into the prompt.
  • --size(Optional): Output resolution, default 1280*1280. wan2.6-t2i supports:
    • Total pixels between 1280×1280 and 1440×1440
    • Aspect ratio between 1:4 and 4:1
    • Examples:1280*1280(square image),768*2700(portrait tall image),1696*960(16:9 landscape image)
  • --n(Optional): Number of images generated at once, 1–4, default 1.
  • --output-dir(Optional): Output directory, default ./tmp/qwen-wanx-comic-<时间戳>。

Script Workflow

  1. Use wan2.6-t2i model to create an asynchronous image task (new protocol, no longer supports the style API parameter; instead incorporate the style description into the prompt).
  2. Periodically poll the task status until SUCCEEDED or timeout (default 5 minutes).
  3. Parse the returned choices[].message.content[] structure, download the image URL to the local directory.
  4. Print MEDIA: <绝对路径> lines so that OpenClaw can automatically attach the images in the reply.

Assistant Usage Tips

  • When conversing with the user, prioritize converting their needs into specific, vivid comic descriptions, then invoke this skill.
  • If the user does not specify a style but mentions keywords such as "comic, anime, 2D, webtoon, storyboard", this skill can be proactively chosen.
  • For needs requiring complex long-form comics or multi-page storyboards, generate only representative scenes or covers, and inform the user that the current skill is mainly based on a single image or a small number of scenes.
  • After generation is complete, inform the user.