npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-modelscope-image

v0.1.1

Published

n8n community node for Modelscope Image generation API - Generate images using Modelscope AI models

Readme

English | 简体中文

🚀 拒绝无效加班,掌握 n8n 自动化黑科技

想让工作更轻松?扫码关注微信公众号 【曹工不加班】,免费获取:

  • 📚 独家保姆级 n8n 实战教程
  • 🧩 社区专享 VIP 节点
  • 💡 高阶自动化工作流模板

曹工不加班


n8n-nodes-modelscope-image

这是一个 n8n 社区节点,用于 Modelscope 图像生成 API。它允许你在 n8n 工作流中使用 Modelscope 的 AI 模型根据文本提示词生成图像。

n8n 是一个 公平代码许可 的工作流自动化平台。

安装 操作 功能特性 支持的模型 支持的纵横比 凭证 节点参数 使用说明 兼容性 资源

安装

请遵循 n8n 社区节点文档中的 安装指南

操作

  • 生成图像 (Generate Image):根据文本提示词使用 Modelscope AI 模型生成图像。

功能特性

  • 文生图:使用 Modelscope AI 模型从文本提示词生成图像
  • 多模型支持:支持 Z-Image-Turbo 和 Qwen-Image-2512 模型
  • 灵活的纵横比:提供 12 种预设比例或输入自定义比例
  • 分辨率控制:根据长边自动计算或手动指定分辨率
  • 多种输出格式:二进制文件、Base64 字符串或 Base64 Data URL
  • 批量处理:支持多个项目独立轮询处理
  • 可配置超时:可调整轮询间隔和超时设置

支持的模型

| 模型名称 | 模型 ID | |----------|---------| | Z-Image-Turbo | Tongyi-MAI/Z-Image-Turbo | | Qwen-Image-2512 | Qwen/Qwen-Image-2512 |

支持的纵横比

| 比例 | 描述 | |------|------| | 2.35:1 | 电影宽银幕 (Cinematic widescreen) | | 21:9 | 超宽屏 (Ultra-wide) | | 2:1 | 全景 (Panoramic) | | 16:9 | 标准宽屏 (Standard widescreen) | | 3:2 | 经典照片 (Classic photo) | | 4:3 | 标准显示器 (Standard monitor) | | 5:4 | 大画幅 (Large format) | | 1:1 | 正方形 (Square) | | 4:5 | 竖版 Instagram (Portrait Instagram) | | 3:4 | 竖版显示器 (Portrait monitor) | | 2:3 | 竖版照片 (Portrait photo) | | 9:16 | 竖版视频 (Vertical video) |

你也可以输入自定义纵横比,格式为 宽:高(例如:16:92.35:1)。

凭证

使用此节点需要 Modelscope API Token:

  1. 前往 Modelscope 并创建账户
  2. 导航至 我的访问令牌
  3. 创建新令牌或复制现有令牌
  4. 在 n8n 中创建 "Modelscope Image API" 类型的新凭证
  5. 粘贴你的 API Token

凭证字段

| 字段 | 描述 | 默认值 | |------|------|--------| | API Token | 你的 Modelscope API 令牌 | (必填) | | Base URL | API 基础 URL | https://api-inference.modelscope.cn/ |

节点参数

必填参数

| 参数 | 描述 | |------|------| | 操作 (Operation) | 当前支持"生成图像 (Generate Image)" | | 模型 (Model) | 选择要使用的 AI 模型 | | 提示词 (Prompt) | 描述要生成图像的文本 | | 纵横比 (Aspect Ratio) | 从列表选择或输入自定义比例 |

可选参数(在选项中)

| 参数 | 描述 | 默认值 | |------|------|--------| | 长边 (Long Edge) | 较长边的像素长度 | 2048 | | 分辨率 (Resolution) | 手动分辨率(覆盖比例计算) | - | | 二进制字段名 (Binary Field Name) | 二进制数据的输出字段名 | data | | 文件名 (File Name) | 输出文件名 | 自动生成 | | 输出格式 (Output Format) | 二进制、Base64 或 Data URL | 二进制 (Binary) | | 轮询间隔 (Polling Interval) | 状态检查间隔秒数 | 5 | | 超时 (Timeout) | 最大等待时间(秒) | 300 |

使用说明

基础图像生成

  1. 将 "Modelscope Image" 节点添加到工作流
  2. 配置凭证
  3. 选择模型(例如:"Z-Image-Turbo")
  4. 输入提示词(例如:"一只金色的猫坐在天鹅绒垫子上")
  5. 选择纵横比(例如:"1:1" 正方形)
  6. 执行节点

输出

节点返回:

JSON 输出:

{
  "taskId": "abc123...",
  "imageUrl": "https://...",
  "size": "2048x2048",
  "model": "Tongyi-MAI/Z-Image-Turbo"
}

二进制输出(默认): 生成的图像作为二进制文件附加到 data 字段。

分辨率计算

使用纵横比时:

  • 长边设置为指定值(默认:2048)
  • 短边根据比例自动计算
  • 示例:21:9 比例,长边 2048 = 2048×878 像素

使用手动分辨率时:

  • 格式:宽x高(例如:1024x768
  • 两个维度必须在 64 到 2048 之间

兼容性

兼容 [email protected] 或更高版本。

资源

版本历史

0.1.0

  • 首次发布
  • 支持文生图
  • 支持 Z-Image-Turbo 和 Qwen-Image-2512 模型
  • 可配置纵横比和分辨率
  • 多种输出格式(二进制、Base64、Data URL)
  • 批量处理,独立任务轮询

许可证

MIT