Grok Imagine图像质量:生成

本ComfyUI工作流通过GrokImageNode节点,调用Grok Imagine API根据文本提示生成图片,并用SaveImage保存结果。适用于需要图片内嵌清晰可读文本(如标牌、海报、UI原型)且视觉细节强的场景。流程极简——输入提示,输出图片——便于专注提示词打磨和快速迭代。

技术上,GrokImageNode将你的提示词及节点支持的参数(如宽高比/尺寸、种子或图片数量,视构建而定)发送到远程Grok Imagine模型,返回生成的图片张量到ComfyUI。SaveImage节点将图片写入ComfyUI输出目录,文件名前缀可自定义。该流程为你提供稳定可靠的文本转图片体验,利用外部API提升质量和文本渲染,同时保留ComfyUI节点式工作区的便利。

API

Use this workflow from code

Every Comfy workflow is a JSON graph. The payload below is this workflow, exactly as ComfyUI runs it — fetch it from the URL, keep it in version control, or load it in ComfyUI and run it node by node.

6be2f4df213a.json
Fetching workflow JSON…

Run it from TypeScript or Python with the Comfy SDK. The same code targets Comfy Cloud or a ComfyUI you host yourself — only the base URL changes.

// Install (beta)
npm i @comfyorg/sdk

// Run this workflow (TypeScript)
import { Comfy } from "@comfyorg/sdk";

const client = new Comfy({ apiKey: "comfyui-..." });
const wf = await client.workflows.fromFile("workflow_api.json");
const job = await client.run(wf);
await job.getOutputs("<output-node-id>")[0].toFile("output.png");

The SDK takes a workflow in API format: open this workflow in ComfyUI and use File → Export Workflow (API).

Comfy Cloud API access requires a plan with an API key.

常见问题

常见问题

查看所有工作流
Character
Cinematic
Image to Video
Lip Sync
Multiple Angles
Portrait
Style Reference
Style Transfer
Text to Video
Video Generation
Video
Showing 30 of 30 templates