Ernie Image Turbo: Text To Image
Generate images from text prompts using the ERNIE-Image turbo model. Input a text description and receive a high-quality image with precise text rendering and…
下載工作流程在 Cloud 中試用 API 文件
關於
Generate images from text prompts using the ERNIE-Image turbo model. Input a text description and receive a high-quality image with precise text rendering and…
您提供的內容
- 正在讀取工作流程
在 ComfyUI 中執行。 此工作流程無法在此頁面上執行。請下載並在 ComfyUI 中開啟。
下載工作流程此工作流程尚無範例輸出。
工作流程內部
節點圖的唯讀預覽。請在 Comfy Cloud 中開啟,或下載後編輯節點。
Loading the graph
Open full-size workflow preview此工作流程中的檔案
- Comfy Cloud
- 是
- 輸出
- 圖片
- 作者
- 作者無法使用
需要自訂節點
- 正在讀取工作流程
從程式碼使用此工作流程
可行時會根據工作流程圖和輸入內容產生;否則會顯示儲存的範例。執行可能產生費用的程式碼前,請檢查認證資訊和端點。
1 取得 API 金鑰 ↗
What you need
- Runs on
- Comfy Cloud
- 金鑰
- COMFY_API_KEY
需要付費 Cloud 方案與點數。
下載 API JSONAPI 文件 ↗
# Python 3.10+: pip install comfy-sdk==0.4.0
import os
from comfy_sdk import Comfy
api_key = os.environ.get("COMFY_API_KEY", "").strip()
if not api_key: raise RuntimeError("Set COMFY_API_KEY")
os.environ.setdefault("COMFY_BASE_URL", "https://cloud.comfy.org")
client = Comfy(api_key=api_key)
workflow = client.workflows.from_json({
"73": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "Ernie-Image-Turbo",
"images": [
"88:65",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"88:100": {
"class_type": "PreviewAny",
"inputs": {},
"_meta": {
"title": "Preview as Text (Int to String)"
}
},
"88:101": {
"class_type": "StringReplace",
"inputs": {
"find": "{width}",
"replace": [
"88:99",
0
],
"string": [
"88:93",
0
]
},
"_meta": {
"title": "Replace Text"
}
},
"88:102": {
"class_type": "StringReplace",
"inputs": {
"find": "{height}",
"replace": [
"88:100",
0
],
"string": [
"88:101",
0
]
},
"_meta": {
"title": "Replace Text"
}
},
"88:103": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"88:97",
0
]
},
"_meta": {
"title": "Preview as Text (Int to String)"
}
},
"88:62": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "ministral-3-3b.safetensors",
"device": "default",
"type": "flux2"
},
"_meta": {
"title": "Load CLIP"
}
},
"88:63": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "flux2-vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"88:65": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"88:70",
0
],
"vae": [
"88:63",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"88:66": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "ernie-image-turbo.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"88:67": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"88:62",
0
],
"text": [
"88:97",
0
]
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"88:70": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 1,
"latent_image": [
"88:71",
0
],
"model": [
"88:66",
0
],
"negative": [
"88:91",
0
],
"positive": [
"88:67",
0
],
"sampler_name": "euler",
"scheduler": "simple",
"seed": 423299999918804,
"steps": 8
},
"_meta": {
"title": "KSampler"
}
},
"88:71": {
"class_type": "EmptyFlux2LatentImage",
"inputs": {
"batch_size": 1,
"height": 1024,
"width": 1024
},
"_meta": {
"title": "Empty Flux 2 Latent"
}
},
"88:91": {
"class_type": "ConditioningZeroOut",
"inputs": {
"conditioning": [
"88:67",
0
]
},
"_meta": {
"title": "Conditioning Zero Out"
}
},
"88:93": {
"class_type": "StringReplace",
"inputs": {
"find": "{prompt}",
"replace": [
"88:94",
0
],
"string": "<s>[SYSTEM_PROMPT]你是一个专业的文生图 Prompt 增强助手。你将收到用户的简短图片描述及目标生成分辨率,请据此扩写为一段内容丰富、细节充分的视觉描述,以帮助文生图模型生成高质量的图片。仅输出增强后的描述,不要包含任何解释或前缀。[/SYSTEM_PROMPT][INST]{\"prompt\": \"{prompt}\", \"width\": {width}, \"height\": {height}}[/INST]"
},
"_meta": {
"title": "Replace Text"
}
},
"88:94": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "A stylized cinematic side-profile medium shot portrait of a young European woman with sleek dark hair in a tight low bun, wearing a crisp white ruffled-collar shirt, eyes closed in serene contemplation, standing against a moody, dark gradient deep indigo-blue twilight sky with layered misty mountain silhouettes in the background, extreme high-contrast split neon lighting: 95% of the scene bathed in deep, saturated cool cyan-blue ambient light (dim, moody, low-key), with a sharp, intense, vivid neon pink-orange rim light tracing her facial profile, neck, and collar, creating bold color blocking and a surreal, artistic aesthetic, minimalist composition, high-fashion editorial, 8K, ultra-sharp focus on subject, moody desaturated blue tones, dramatic contrast, atmospheric depth, tranquil introspective vibe, dark atmospheric background, no overexposure, stylized color grading, neon rim light glow, low-key cool fill light."
},
"_meta": {
"title": "String (Multiline - Prompt)"
}
},
"88:95": {
"class_type": "TextGenerateV2",
"inputs": {
"clip": [
"88:98",
0
],
"max_length": 2048,
"mtp": "auto",
"prompt": [
"88:102",
0
],
"sampling_mode": "on",
"sampling_mode.min_p": 0.05,
"sampling_mode.presence_penalty": 0,
"sampling_mode.repetition_penalty": 1.05,
"sampling_mode.seed": 0,
"sampling_mode.temperature": 0.6,
"sampling_mode.top_k": 64,
"sampling_mode.top_p": 0.8,
"thinking": False,
"use_default_template": True
},
"_meta": {
"title": "Generate Text"
}
},
"88:96": {
"class_type": "PrimitiveBoolean",
"inputs": {
"value": True
},
"_meta": {
"title": "Enable prompt enhancement?"
}
},
"88:97": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"88:94",
0
],
"on_true": [
"88:95",
0
],
"switch": [
"88:96",
0
]
},
"_meta": {
"title": "If/Else Switch"
}
},
"88:98": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "ernie-image-prompt-enhancer.safetensors",
"device": "default",
"type": "flux2"
},
"_meta": {
"title": "Load CLIP (PE)"
}
},
"88:99": {
"class_type": "PreviewAny",
"inputs": {},
"_meta": {
"title": "Preview as Text (Int to String)"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)相關工作流程
- EERNIE-Image
Ernie Image: Text to Image
- ZZ-Image-Turbo
1.1 入門-文字轉圖像
- Nano Banana 2 Text-to-Image
3x3 Contact Sheet
- AAnima
Anima Anime 文生圖產生
- AAnima
Anima Base v1:文字轉圖像
- AAnima
Anima Lllite: Any Control to Image
- AAnima
Anima Lllite: Depth Control to Image
- AAnima
Anima Lllite: Image Inpainting
- QQuiver
Arrow 2: Text to SVG
- BBoogu
Boogu Turbo: Text to Image
- BRIA
Bria: FIBO 2.0 Text to Image
- CChroma, Flux
Chroma: 文生圖