qwenz-image-gen

Generate images using Alibaba Cloud Bailian Qwen-Image and Z-Image models (通义千图文生图 + 人像照片模型)

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 760 · 0 current installs · 0 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
Name/description match the observed behavior: the script calls dashscope.aliyuncs.com and requests image generation from Qwen-Image / Z-Image models. Model selection, sizes, and CLI options align with the stated purpose.
!
Instruction Scope
SKILL.md and the script instruct the agent to obtain DASHSCOPE_API_KEY from the environment or a TOOLS.md file. The code looks for TOOLS.md in the current working directory, an upward traversal path (four parents up from the script), and a hard-coded /home/admin/clawd/TOOLS.md — these extra filesystem probes are not documented in SKILL.md and may read files outside the skill's intended workspace.
Install Mechanism
There is no install spec (instruction-only plus a single script). Nothing is downloaded or written by an installer; the script is executed directly, which is low risk compared with arbitrary remote installs.
Credentials
The skill requires a single credential (DASHSCOPE_API_KEY), which is appropriate for calling the external API. The script uses the key solely as a Bearer token to call the Aliyun endpoint.
Persistence & Privilege
always is false and the skill does not request persistent platform-wide privileges. It does write generated images to disk (user-specified or timestamped filenames) which is expected behavior.
What to consider before installing
This skill appears to do what it says (call Alibaba Bailian image APIs), but review how it obtains your API key before installing. Prefer setting DASHSCOPE_API_KEY as an environment variable rather than placing secrets in shared TOOLS.md files. If you must use TOOLS.md, inspect its contents and location — the script will search: the current working directory's TOOLS.md, a TOOLS.md located four directories above the script, and /home/admin/clawd/TOOLS.md. Those extra paths could cause the skill to read unintended files that may contain other secrets. Run the script in a restricted project workspace or container, verify the API hostname (dashscope.aliyuncs.com) matches your provider, and consider manually supplying the key to avoid accidental disclosure.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.1
Download zip
latestvk971yn78zra4zkh7eywdn5m3eh80x38m

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Runtime requirements

🎨 Clawdis

SKILL.md

Qwen-Image / Z-Image Skill

基于阿里云百炼的文图生成技能,智能识别场景自动选择最佳模型:

  • 🧍 人像/照片z-image-turbo(专精高质量人像,支持胶片质感)
  • 🖼️ 通用文图qwen-image-max(擅长复杂文字渲染、艺术风格)

Features

  • 🤖 智能模型选择:自动检测人像场景,无需手动选择模型
  • 🎨 双模型支持:Qwen-Image(通用) + Z-Image(人像)
  • ✍️ 中文文字渲染:在图像中完美呈现复杂中文字符
  • 📐 多尺寸支持:16:9、4:3、1:1、3:4、9:16 等多种比例
  • 🔧 可手动指定:支持强制使用特定模型

Setup

  1. 阿里云百炼控制台 获取 API Key
  2. 配置方式选择其一:
    • 环境变量export DASHSCOPE_API_KEY="sk-xxx"
    • TOOLS.md:在 TOOLS.md 中添加 DASHSCOPE_API_KEY: sk-xxx

地域注意:北京和新加坡地域 API Key 不互通

Available Models

模型描述最佳场景
qwen-image-max最佳质量,减少AI痕迹,文字渲染优秀漫画、插画、图文设计、风景、静物
qwen-image-plus质量与速度平衡通用场景
qwen-image基础模型快速生成
z-image-turbo人像专精,胶片质感,真实感强人像照片、人像写真、film grain效果

Supported Sizes

尺寸比例说明
1664*92816:9横向宽屏(通用默认)
1472*11044:3标准比例
1328*13281:1方形
1104*14723:4竖向
928*16649:16手机竖屏
1120*14404:5人像推荐

Usage

🎯 快速入门(推荐)

直接写提示词,自动识别场景并选择最佳模型:

# 人像类 → 自动使用 z-image-turbo
python scripts/generate.py "短发少女,清新自然风格,微笑"

# 通用类 → 自动使用 qwen-image-max
python scripts/generate.py "七龙珠孙悟空对战比克大魔王,漫画风格"

# 含film grain关键词 → 自动使用 z-image
python scripts/generate.py "胶片感,Kodak Portra 400风格的人像"

🔧 高级选项

python scripts/generate.py "prompt" \
    --model z \              # 强制指定模型 (z/qwen/auto)
    --size 1328*1328 \       # 图片尺寸
    --prompt-extend \        # 开启提示词扩展
    --no-watermark \         # 禁用水印
    --output my-image.png    # 输出路径

Auto-Detection Keywords

以下关键词会触发自动选择 z-image-turbo

人物类:人、女、男、少女、帅哥、美女、肖像、人物、face、facial

照片/胶片类:photo、photograph、film grain、analog、Kodak、胶片、portra、cinematic、photorealistic、真实、写真人像

使用示例

人像照片(z-image)

python scripts/generate.py "东亚年轻女性,户外雪地场景,film grain效果,胶片质感"

漫画风格(qwen-image)

python scripts/generate.py "七龙珠孙悟空对战比克大魔王,漫画风格,能量波爆炸,天空背景"

带中文文字的漫画

python scripts/generate.py "一副对联,上联:智启千问,下联:机道为善,横批:人机共生"

Tips

  • 人像首选 z-image:对面部细节、皮肤质感、胶片感优化更好
  • 文字渲染选 qwen:复杂中文、图文混排场景更精准
  • 自动模式省心:无需纠结选哪个模型
  • 提示词长度:正向 ≤800字符,负向 ≤500字符
  • 扩展提示词--prompt-extend 可以让AI自动优化你的描述

Qwen-Image Skill - 国产文生图利器 🇨🇳

Files

2 total
Select a file
Select a file to preview.

Comments

Loading comments…