Ideogram P-Image:文字轉圖像
使用 Ideogram 的高速 P-Image 模型,根據文字描述生成圖像,品質可媲美主流圖像模型,且成本與延遲大幅降低。僅需輸入一組文字提示,即可輸出一張圖像,並可調整品質等級與解析度。非常適合設計流程中的快速反覆試作、大量內容產製,以及對成本敏感的視覺 A/B 測試。
關於
此工作流程透過 ComfyUI 調用 Ideogram 的 P-Image 模型,將單一文字提示轉換為完成的圖像。流程會用 BuildJsonPromptIdeogram 組裝請求,傳送至 IdeogramPImage 節點(P-Image 模型的 API 呼叫器),並回傳生成的圖像,立即可預覽與匯出。你可簡單調整品質等級與解析度,靈活平衡畫質、速度與每次渲染的成本。
PreviewAny 於兩個關鍵點提供即時回饋:你可在發送前檢查結構化 JSON 載荷,也可在回傳後檢視生成圖像。CreateBoundingBoxes 可在預覽中加入可選的構圖輔助框,協助規劃構圖或安全區域——這對反覆調整版面很有幫助,但不會限制實際生成內容。當你對輸出滿意時,SaveImageAdvanced 可彈性命名並儲存圖像,方便版本歸檔與批次產出,適合設計審查或 A/B 測試。
您提供的內容
- 正在讀取工作流程
在 ComfyUI 中執行。 此工作流程無法在此頁面上執行。請在已載入所有內容的 Comfy Cloud 中開啟,或下載到您自己的 ComfyUI。
在 Cloud 中試用工作流程內部
節點圖的唯讀預覽。請在 Comfy Cloud 中開啟,或下載後編輯節點。
Loading the graph
Open full-size workflow preview- 作者
- ComfyUI
需要自訂節點
- 正在讀取工作流程
從程式碼使用此工作流程
可行時會根據工作流程圖和輸入內容產生;否則會顯示儲存的範例。執行可能產生費用的程式碼前,請檢查認證資訊和端點。
What you need
- Runs on
- Comfy Cloud
- 金鑰
- COMFY_API_KEY
需要付費 Cloud 方案與點數。
# 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({
"4": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"12",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"9": {
"class_type": "CreateBoundingBoxes",
"inputs": {
"editor_state": {
"__value__": []
},
"height": 1024,
"last_incoming": {
"__value__": [
{
"height": 124,
"metadata": {
"desc": "Large elegant white display serif title at the top center of the cover. Decorative swash flourishes extend from the letters. Bold upright letterforms with high contrast against the dark background.",
"palette": [
"#ffffff"
],
"text": "Ideogram P-Image",
"type": "text"
},
"width": 824,
"x": 128,
"y": 32
},
{
"height": 928,
"metadata": {
"desc": "Figure in theatrical Renaissance-inspired high-fashion costume, waist-up. Smooth matte white porcelain mask with small dark circular eye holes and neutral melancholy expression. Antique-gold sculpted floral crown headpiece with off-white draped veil flowing over the shoulders. Dark black textured bodice with intricate gold embroidery and a large gold tassel pendant at the chest center. Extremely voluminous deep red silk ruffled sleeves. One gloved hand raised near the face in a delicate theatrical gesture.",
"palette": [
"#ffffff",
"#8b0000",
"#c9a227",
"#1a1a1a"
],
"text": "",
"type": "obj"
},
"width": 992,
"x": 32,
"y": 96
},
{
"height": 300,
"metadata": {
"desc": "Small white sans-serif side label stacked vertically along the left margin. Section header in medium weight with a short editorial quote beneath in lighter weight, left-aligned.",
"palette": [
"#ffffff"
],
"text": "CUSTOM\nNODES\n\"Extend what\nyou can build.\"",
"type": "text"
},
"width": 88,
"x": 22,
"y": 300
},
{
"height": 300,
"metadata": {
"desc": "Small white sans-serif side label stacked vertically along the right margin. Section header in medium weight with a short editorial quote beneath in lighter weight, right-aligned.",
"palette": [
"#ffffff"
],
"text": "WORKFLOW\n\"Drag. Connect.\nGenerate.\"",
"type": "text"
},
"width": 88,
"x": 914,
"y": 300
},
{
"height": 192,
"metadata": {
"desc": "Wide white sans-serif editorial quote in all capitals spanning the bottom of the cover. Medium weight, centered, with generous letter-spacing across two lines.",
"palette": [
"#ffffff"
],
"text": "CONNECT NODES. BUILD WORLDS. COMFYUI MAKES IT FLOW.",
"type": "text"
},
"width": 928,
"x": 64,
"y": 800
}
]
},
"width": 1024
},
"_meta": {
"title": "Create Bounding Boxes"
}
},
"11": {
"class_type": "IdeogramPImage",
"inputs": {
"aspect_ratio": "1:1",
"prompt": [
"4",
0
],
"prompt_upsampling": "AUTO",
"quality": "MEDIUM",
"resolution": "1K",
"seed": 1290088285
},
"_meta": {
"title": "Ideogram & Pruna P-Image"
}
},
"12": {
"class_type": "BuildJsonPromptIdeogram",
"inputs": {
"aesthetics": "High-fashion avant-garde editorial aesthetic with dramatic contrast and ornate costume details.",
"background": "dark",
"color_palette": {
"__value__": []
},
"element": [
"9",
2
],
"high_level_description": "An avant-garde high-fashion magazine cover titled 'Ideogram P-Image' featuring a masked figure in ornate Renaissance-inspired costume with voluminous red silk sleeves against a dark navy backdrop with subtle concentric graphic lines.",
"lighting": "Dramatic directional chiaroscuro lighting highlighting red silk and gold embroidery with deep shadows across the backdrop.",
"medium": "",
"style": "photo",
"style.photo": "editorial"
},
"_meta": {
"title": "Build JSON Prompt (Ideogram)"
}
},
"13": {
"class_type": "SaveImageAdvanced",
"inputs": {
"filename_prefix": "Ideogram_P-Image",
"format": "png",
"format.bit_depth": "8-bit",
"format.input_color_space": "sRGB",
"images": [
"11",
0
]
},
"_meta": {
"title": "Save Image (Advanced)"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)問答
不需要。圖像由 Ideogram 的 P-Image 模型透過 API 生成,ComfyUI 負責發送請求與顯示結果,無需高階 GPU 的一般電腦即可運作。
這些設定會影響畫面細節、渲染時間與 API 成本。品質越高、解析度越大,畫質通常越好,但延遲與點數消耗也會增加。建議先用中等設定快速草稿,需更高品質時再提升。
不會。CreateBoundingBoxes 僅作為 PreviewAny 的視覺輔助,協助規劃構圖,這些框不會傳送到 Ideogram API,也不會限制模型輸出。
保持提示詞內容、品質與解析度完全一致。如節點有種子參數,請固定種子以利重現。否則可多次生成後挑選最接近者,再以小幅度調整提示詞反覆試作。
相關工作流程
- ZZ-Image-Turbo
1.1 入門-文字轉圖像
- ZZ-Image-Turbo
2.1 Creator-擴散基礎
- Nano Banana 2 Text-to-Image
3x3 Contact Sheet
- 合合作夥伴節點
AI on the Lot 2026 - Z-Image Turbo - t2i
- 合合作夥伴節點
Anima Base v1:文字轉圖像
- CChroma
Chroma1 Radiance 文生圖
- CChroma, Flux
Chroma: 文生圖
- Flux, Flux.1
Flux.1 [專業版]:文生圖
- Flux, Flux.1 Krea Dev
Flux.1 Krea Dev
- Flux.1, Flux
Flux.1 Schnell FP8
- Flux.1, Flux
Flux.1 Schnell Full: 文生圖
- Flux.1, Flux
Flux.1 開發專用 fp8: 文生圖