跳到正文

宝玉:多服务图像生成

通过支持的图像服务组织文本生成图片、参考图片及批量任务,按环境准备 API 配置和模型参数。

开源精选内容生产53 个文件26,681 Stars浏览次数 0JimLiu/baoyu-skills MIT版本 1567581
开始使用

下载前阅读 SKILL.md 中的使用条件,并确认所用工具支持对应能力。

输入资料
提示词、尺寸与参考图片 所选服务的访问权限 阅读本节完整说明
交付内容
生成图片 可复查的任务参数 阅读本节完整说明
  1. 获取完整包,保留配套文件的目录结构。
  2. 按照原文准备所需工具、依赖与输入资料。
  3. 阅读对应使用步骤与输入输出说明,在自己的环境中验证结果。

使用提示摘自原文,配套文件保留来源版本;实际运行条件以各包说明为准。

正文

获取原文件

references/providers/dashscope.md

Read when the user picks --provider dashscope, sets default_model.dashscope, or asks for Qwen-Image behavior. The SKILL.md only names the default — this file covers model families, sizing rules, and limits.

Model Families

qwen-image-3.0* / qwen-image-2.0* — recommended modern family (identical sizing envelope). Members: qwen-image-3.0-pro, qwen-image-2.0-pro, qwen-image-2.0-pro-2026-04-22, qwen-image-2.0-pro-2026-03-03, qwen-image-2.0, qwen-image-2.0-2026-03-03.

  • qwen-image-3.0-pro is the newest flagship; qwen-image-2.0-pro remains the built-in default until the 3.0 request shape is verified end to end

  • Free-form size in 宽*高 format

  • Total pixels must be between 512*512 and 2048*2048

  • Default ≈ 1024*1024

  • Best choice for custom ratios (e.g. 21:9) and text-heavy Chinese/English layouts

Fixed-size family — qwen-image-max, qwen-image-max-2025-12-30, qwen-image-plus, qwen-image-plus-2026-01-09, qwen-image.

  • Only five sizes allowed: 1664*928, 1472*1104, 1328*1328, 1104*1472, 928*1664
  • Default is 1664*928
  • qwen-image currently has the same capability as qwen-image-plus

wan2.7-image* — multimodal Wan 2.7 family. Members: wan2.7-image-pro, wan2.7-image.

  • Free-form size in 宽*高 format, plus aspect-ratio inference
  • wan2.7-image-pro text-to-image (no --ref): total pixels in [768*768, 4096*4096], ratio in [1:8, 8:1]
  • wan2.7-image-pro with reference images and wan2.7-image (all scenarios): total pixels in [768*768, 2048*2048], ratio in [1:8, 8:1]
  • Default: 1024*1024 (--quality normal) or 2048*2048 (--quality 2k); 4K requires explicit --size
  • Supports up to 9 reference images in --ref (image editing / multi-image fusion)
  • Reference images are sent inline as base64 (or passed through if the path is an http(s):// URL)
  • API does NOT use prompt_extend; the skill omits it for this family
  • The Wan 2.7 API defaults n to 4 in non-collage mode and bills per generated image. baoyu-image-gen forces n: 1 and rejects --n > 1 to avoid silently paying for and discarding extra images.

Legacy — z-image-turbo, z-image-ultra, wanx-v1. Only use when the user explicitly asks for legacy behavior.

Size Resolution

  • --size wins over --ar
  • For qwen-image-3.0* / qwen-image-2.0*: prefer explicit --size; otherwise infer from --ar using the recommended table below
  • For qwen-image-max/plus/image: only use the five fixed sizes; if the requested ratio doesn't fit, switch to qwen-image-2.0-pro or qwen-image-3.0-pro
  • For wan2.7-image*: explicit --size is validated against the per-mode pixel/ratio limits; otherwise the size is derived from --ar and --quality (normal ≈ 1K, 2k ≈ 2K). To request 4K with wan2.7-image-pro text-to-image, pass --size explicitly (e.g. 4096*4096, 3840*2160)
  • --quality is a baoyu-image-gen preset, not an official DashScope field. The mapping of normal/2k onto the qwen-image-3.0* / qwen-image-2.0* and wan2.7-image* tables is an implementation choice, not an API guarantee
Ratio normal 2k
1:1 1024*1024 1536*1536
2:3 768*1152 1024*1536
3:2 1152*768 1536*1024
3:4 960*1280 1080*1440
4:3 1280*960 1440*1080
9:16 720*1280 1080*1920
16:9 1280*720 1920*1080
21:9 1344*576 2048*872

Reference Images

  • Only wan2.7-image-pro and wan2.7-image accept --ref. Other DashScope models (qwen-image-3.0*, qwen-image-2.0*, qwen-image-max/plus/image, legacy) reject --ref and the user is steered to a different provider/model.
  • Up to 9 reference images per request. Local files are inlined as base64 data URLs; http(s):// URLs are forwarded as-is.
  • Supplying any --ref automatically clamps the wan2.7-image-pro pixel ceiling from 4K to 2K (the API only supports 4K for pure text-to-image with no image input).

Not Exposed

DashScope APIs also support negative_prompt, prompt_extend, watermark, thinking_mode, seed, bbox_list, enable_sequential, and color_palette. baoyu-image-gen does not expose them as CLI flags today; the wan2.7 family relies on the API defaults (e.g. thinking_mode=true). The skill always sends n=1 for wan2.7 — if you want grid/collage mode you currently need to call the API directly.

Official References

CONTACT HAONAN

联系haonan

医疗 AI · 产品与独立开发

刘浩南

关注医疗 AI 从 demo 到真实落地,聚焦产品化、商业化与院内工作流效率提升。

12年医疗产研经验,大湾区头部医疗AI公司前产品总监,独立开发者

医疗 AI 产品化医疗 AI 商业化院内工作流效率
刘浩南的微信联系二维码
微信扫一扫,联系 haonan