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.
3 · 920 · 4 current installs · 4 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
The skill's purpose (generate images via Alibaba Bailian Qwen-Image / Z-Image) matches the code and API endpoint used (dashscope.aliyuncs.com). However, the registry metadata in the package summary lists no required environment variables while SKILL.md and the script declare and require DASHSCOPE_API_KEY — an inconsistency that should be resolved.
Instruction Scope
Runtime instructions and the included script are focused on image generation and are proportionate: they build a JSON payload, POST to the Bailian endpoint, parse the response, and download the returned image. The script also attempts to discover the API key by reading TOOLS.md from several filesystem locations (current working dir, an absolute path /home/admin/clawd/TOOLS.md, and a path four levels up from the script). Reading those files is intended to obtain the declared key, but the locations accessed could expose or read files outside the skill's folder — worth noting before granting access.
Install Mechanism
This is an instruction-only skill with a single Python script and no install spec or external downloads. There is no package install or archive extraction — low install-surface risk.
Credentials
The only credential the skill needs is DASHSCOPE_API_KEY (used as a Bearer token to call the Bailian API), which is reasonable for this purpose. But the mismatch between the package-level 'required env vars: none' and SKILL.md's 'DASHSCOPE_API_KEY' is confusing. Also, the script's fallback to searching multiple TOOLS.md locations may read user files containing other secrets if present — it only extracts a matching DASHSCOPE_API_KEY line, but file reads are sensitive.
Persistence & Privilege
The skill does not request always:true, does not modify other skills or system config, and does not install persistent components. It only performs network calls at runtime and writes the downloaded image to a local path specified by the user (or a generated filename).
What to consider before installing
This skill appears to implement the described Alibaba Bailian image-generation flow and only needs a DASHSCOPE_API_KEY. Before installing: 1) verify the package metadata vs SKILL.md — ensure you supply DASHSCOPE_API_KEY if you intend to use it; 2) prefer setting the API key as an environment variable (export DASHSCOPE_API_KEY) rather than relying on TOOLS.md, since the script will try to read TOOLS.md from several filesystem locations (including unexpected paths) which could expose local files; 3) consider creating a dedicated API key with limited scope/quota for this skill; 4) be aware the script makes outbound HTTPS requests to dashscope.aliyuncs.com and will download the returned image from whatever host the API provides; 5) if you are uncomfortable with the script reading files outside the skill directory, inspect or run it in an isolated environment (container or VM) or modify the script to restrict TOOLS.md lookup to a single safe location. If these issues are acceptable, the skill is plausibly coherent with its stated purpose; otherwise proceed with caution.

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

Current versionv1.0.0
Download zip
latestvk979zg5ns5hmwt3vsj9fppa7b980w2m3

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…