使用魔搭 ModelScope 通义万相模型生成 AI 图像 - Generate AI images with ModelScope Tongyi Wanxiang
SaferSkills independently audited ai-image-gen (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Generate high-quality AI images using ModelScope's Tongyi Wanxiang (通义万相) model.
Use this skill when the user wants to:
Trigger phrases (examples):
Extract the image description from the user's request. If the description is vague, ask clarifying questions:
For better results, you can enhance the user's prompt with additional details:
Execute the image generation script:
python ${CLAUDE_SKILL_DIR}/scripts/generate_image.py "your enhanced prompt" --output <output-path>Parameters:
prompt (required): Text description of the image--output, -o: Output file path (default: generated_image.jpg)--model, -m: Model ID (default: Tongyi-MAI/Z-Image-Turbo)Example:
python ${CLAUDE_SKILL_DIR}/scripts/generate_image.py \
"A majestic golden cat sitting on a velvet throne, photorealistic, dramatic lighting" \
--output ./cat_throne.jpgAfter generation:
Required environment variable:
export MODELSCOPE_API_KEY='your-modelscope-api-key'The user needs a ModelScope API key. If not set, the script will prompt the user to configure it.
Required Python packages:
requestsPillow (PIL)Install with:
pip install requests Pillow| Model ID | Description |
|---|---|
Tongyi-MAI/Z-Image-Turbo | Fast generation (default) |
Tongyi-MAI/Z-Image | Higher quality, slower |
User: "帮我画一只在月亮上的猫"
Your response:
python ${CLAUDE_SKILL_DIR}/scripts/generate_image.py \
"A fluffy white cat sitting on the crescent moon, starry night sky background, dreamy atmosphere, digital art style" \
--output moon_cat.jpg📍 坐标:四川成都
身份标签:
我能提供: AIP、RPA自动化、Coze/N8N、小龙虾(OpenClaw)等应用落地交流
想和大家说的话:
干就完了,多用 AI 提效,多用 AI 编程。
雪见运营着一个 付费 AI 陪伴群,每天分享 AI 技术与实战干货:
群内分享内容包括:
额外福利:
| 渠道 | 信息 |
|---|---|
| 微信 | soraaigc(欢迎链接) |
| 公众号 | 雪见AI编程(欢迎关注) |
| 平台 | 链接 | 说明 |
|---|---|---|
| 知识星球 | https://t.zsxq.com/mC8bP | ⭐ 限时免费 加入 |
| AI编程平台 | https://aigocode.com/invite/JHK8VZAQ | 🚀 AI编程 + OpenClaw 必备,强烈推荐! |
| 飞书文档 | https://my.feishu.cn/wiki/XkNawOgzjiK4zektG6dcD4zXnxd | 📚 录播视频 + 文档教程 |
💡 雪见日常使用的大模型:aigocode.com - 搞 AI 编程、玩转 OpenClaw 首选!
感兴趣的朋友欢迎加微信 soraaigc 咨询交流~~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.