关于 transform-generate-image-with-transloadit
这项技能通过 Transloadit 命令行工具按提示词生成图像,也支持输入图像引导生成。文档说明了模型选择、输出选项及模型不可用时的处理方式。
主要功能
- 01根据提示词生成图像
- 02使用输入图像引导生成
- 03选择 Flare 或 Sunburst 模型
- 04设置输出路径和尺寸
- 05查询 Assembly 以排查问题
适用场景
- 01根据文本提示创建图像
- 02用参考图引导场景生成
- 03使用 Sunburst 进行精度优先的生成
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ transloadit/ skills --skill transform-generate-image-with-transloadit安装后在 Claude Code 中输入/transform-generate-image-with-transloadit确认已加载。
详细介绍
运行
使用 Images 2.5 Flare 的 image generate 意图,根据提示词快速生成图像。
显式指定模型,避免较旧的已安装 CLI 选择之前的默认模型。
npx -y @transloadit/node image generate \
--model openai/gpt-image-2.5-flare \
--prompt 'A minimal product photo of a chameleon on white background' \
--output ./out.png
使用 Images 2.5 Sunburst 运行
当用户指定使用 Sunburst,或优先考虑精度而非延迟时,请使用 Sunburst。日常生成默认使用 Flare。保留用户明确指定的较旧模型,不要悄悄替换为较新的模型。
npx -y @transloadit/node image generate \
--model openai/gpt-image-2.5-sunburst \
--width 1024 \
--height 1024 \
--prompt 'A ceramic coffee mug on a white seamless studio background' \
--output ./out.png
使用输入图像运行
你也可以使用一张或多张输入图像来引导生成。请使用有意义的文件名,并在提示词中引用这些文件。
npx -y @transloadit/node image generate \
--model openai/gpt-image-2.5-flare \
--input ./person1.jpg \
--input ./person2.jpg \
--input ./background.jpg \
--prompt 'Place person1.jpg feeding person2.jpg in front of background.jpg' \
--output ./out.png
注意:
- 默认使用
--model openai/gpt-image-2.5-flare,或在注重精度的任务中使用--model openai/gpt-image-2.5-sunburst。 - 仍支持显式选择
--model openai/gpt-image-2和 Google Nano Banana。较旧的gpt-image-2写法仍会选择 GPT Image 2,而非 Images 2.5。 - 多个重复的
--input值会打包到同一个/image/generate请求中。 - 不使用任何
--input也可以仅根据提示词生成图像。 - 如果未指定
--output,仅提示词生成和多输入运行默认使用当前工作目录。
故障排查
npx -y @transloadit/node assemblies get <assemblyIdOrUrl> -j
注意:
- Images 2.5 需要匹配的 API2 后端完成发布。如果模型不可用或账号受限,请说明此限制并与用户确认替代方案;不要悄悄更改明确指定的模型,也不要无限重试。
评论
支持 Markdown