Token导航 LogoToken导航TokenDH.com
图像处理敏感数据github未标认证来源可访问clear审计通过

modelscope-zimage-generatormodelscope z 图像生成器

Agent Skill

用于辅助图像生成、图片编辑、视觉素材处理或图像模型工作流。它适合让 Agent 根据文本生成图片、处理背景、整理视觉提示词或调用相关图像工具。使用时需要确认输入图片、版权来源、输出格式和模型限制;涉及人物、品牌、商品或公开展示素材时,应额外核对授权、真实性和内容合规边界。

总安装

1,341

周安装

57

GitHub Stars

1

下载量

470
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:modelscope-zimage-generator(modelscope z 图像生成器)
来源仓库:https://github.com/haiyuan-ai/agent-skills
仓库路径:skills/modelscope-zimage-generator
安装命令:
npx skills add https://github.com/haiyuan-ai/agent-skills --skill modelscope-zimage-generator
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/haiyuan-ai/agent-skills --skill modelscope-zimage-generator

简介

用于辅助图像生成和图片编辑工作流。modelscope-zimage-generator 属于图像处理类 Skill,可作为该场景下的辅助能力补充。

  • 适合根据文本生成图片或处理视觉提示词。
  • 使用时需确认输入图片版权和输出格式限制。
  • 涉及人物或品牌素材时应核对授权边界。
  • 通过 GitHub 安装,需验证仓库维护状态。

SKILL.md

ModelScope Z-Image Generator Skill

Generate images using ModelScope's Z-Image series models with async polling flow.

When to Use This Skill

Use this skill when the user asks to:

  • generate an image or illustration
  • create artwork or a cover image
  • use ModelScope Z-Image or Z-Image-Turbo explicitly
  • generate multiple image variants
  • apply a LoRA during generation

Common trigger phrases:

  • English: generate an image, create artwork, make a cover, use Z-Image
  • Chinese: 生成图片, 画一张图, 创建封面图, 用 Z-Image

Core Workflow

1. Parse the Request

Identify the generation mode:

  • text-to-image
  • LoRA-assisted generation
  • multi-image or batch generation

2. Choose the Model

Select the model based on the user's request:

  • explicit Z-Image-Turbo -> Tongyi-MAI/Z-Image-Turbo
  • explicit Z-Image -> Tongyi-MAI/Z-Image
  • default -> Tongyi-MAI/Z-Image-Turbo

3. Run the Generator Script

cd /path/to/modelscope-zimage-generator
python scripts/generate_image.py "prompt" output.jpg

4. Return the Result

Tell the user what happened:

  • success: return the output path
  • failure: explain the error clearly

Prerequisites

Before running:

  1. ModelScope API key: obtain it from https://modelscope.cn/my/myaccesstoken
  2. Python environment: requires requests and PIL
  3. Valid script path: make sure generate_image.py exists

Quick Command Mapping

User RequestCommand
"Generate image"python scripts/generate_image.py "prompt" output.jpg
"Use Z-Image"python scripts/generate_image.py "prompt" output.jpg --model "Tongyi-MAI/Z-Image"
"With LoRA"python scripts/generate_image.py "prompt" output.jpg --lora "lora-id"

Common Workflows

Text-to-Image

python scripts/generate_image.py "A golden cat in sunset" golden_cat.jpg

Specify Model

python scripts/generate_image.py "A cat" output.jpg --model "Tongyi-MAI/Z-Image"

With LoRA

# Single LoRA
python scripts/generate_image.py "A cat" output.jpg --lora "liuhaotian/llava-lora"

# Multiple LoRAs (weights sum to 1.0)
python scripts/generate_image.py "A cat" output.jpg --loras '{"lora1": 0.6, "lora2": 0.4}'

Batch Generation

# Generate multiple images in parallel
python scripts/generate_image.py "A cat" cat1.jpg &
python scripts/generate_image.py "A dog" dog1.jpg &
wait

Resources

Read references only when needed:

  • references/api-reference.md - API 完整参数
  • references/lora-config.md - LoRA 配置指南
  • references/troubleshooting.md - 故障排查

Troubleshooting

API Key Not Found

# Option 1: Environment variable
export MODELSCOPE_API_KEY="ms-your-key"

# Option 2: Config file
mkdir -p ~/.config/modelscope
cat > ~/.config/modelscope/config.json << EOF
{"api_key": "ms-your-key"}
EOF

Task Timeout

  • Default timeout is 5 minutes (60 polling attempts)
  • Increase polling attempts or inspect the task status

LoRA Not Working

  • Check whether the LoRA ID is valid
  • Make sure multiple LoRA weights sum to 1.0
  • Do not use --lora and --loras together

适合场景

01

文本生成图片

02

图片风格化

03

产品图和创意图

04

需要 FLUX 模型时

能力概览

能力 1

调用 FLUX 图像模型

能力 2

支持文本生图和图像改写

能力 3

覆盖 LoRA 或风格适配

能力 4

适合创意视觉生成

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

29.67%
按下载量换算139

OpenCode

23.27%
按下载量换算109

Gemini CLI

18.03%
按下载量换算85

Antigravity

12.76%
按下载量换算60

windsurf

8.51%
按下载量换算40

Codex

3.89%
按下载量换算18

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills