外部LLMサーバ連携
ComfyUI自体は「画像・動画などの生成ワークフローをつなぐエンジン」で、LLMを動かす機能は基本的に持っていません。
そこで、LLMは別の推論エンジン(サーバ)に任せ、ComfyUI側は「リクエストを投げて結果を受け取る窓口」だけを担当します。
なぜ処理を分離するのか?
ComfyUI上だけで完結するカスタムノードも存在しますが、LLMの環境は依存関係が重く、組み合わせによってはComfyUIが起動しなくなることがあります。 分離しておけば、ComfyUIの環境を汚しません。
また、LLMのために開発されているもののほうが最新モデルへの対応が早く、安定もしています。 もし強力なPCを複数持っているなら、別PCに処理を投げる構成にも移行できます。
連携する方法
連携方法はいくつかありますが、現状もっとも扱いやすいのが OpenAI API互換です。
“OpenAI” と付いていますが、チャット系LLMに投げるHTTP APIの共通フォーマットとして広く使われています。
Ollamaもこの互換APIを提供しているため、ComfyUI側は OpenAI互換ノードを使うのが手っ取り早いでしょう。
Ollama の導入

今回は、シンプルで使いやすいオープンソースの推論エンジン Ollama を使用します。
インストール
公式サイトからインストーラーをダウンロードし、実行してください。
インストール後、Ollama は常駐して動作します。タスクトレイにアイコンが出ていれば準備完了です。
モデルのダウンロード
使いたいモデルを探しましょう。Ollama Search で対応しているモデルを検索できます。
今回は画像入力もできて、軽量ながら性能の良い、qwen3-vl:8b を使います。
ターミナルを開き、使いたいモデルを指定して実行します。
ollama run qwen3-vl:8b
その他、ローカルとして使いやすいモデル:
- gemma3 : Google開発です。Qwen3 VLと似た用途で使えます
- gpt-oss:20b : OpenAIのオープンウェイトモデルです。テキストのみの処理ですが、非常に強力ですね
- ◯◯-Abliterated : オープンウェイトといえど基本的には(NSFWのみならず)検閲が入っています。このアライメントを除去したモデルはこのような名前がついています
- UGI Leaderboardでは様々なモデルを見つけられます
ComfyUIから動かす
ComfyUIから Ollama へアクセスするためのカスタムノードを導入します。
カスタムノード
OpenAI API互換で投げられるノードを使います。どれでも良いのですが、ここではもっともシンプルなものを使いましょう。
最小チャット

{
"id": "5be6d03e-cb7b-47ae-8cf7-3a4c7e7780c3",
"revision": 0,
"last_node_id": 3,
"last_link_id": 2,
"nodes": [
{
"id": 1,
"type": "OAIAPI_Client",
"pos": [
1256.9237470507412,
424.5453418398783
],
"size": [
267.183749569263,
130
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "API Client",
"type": "OAIAPI_CLIENT",
"links": [
2
]
}
],
"properties": {
"cnr_id": "openai-api",
"ver": "2.0.1",
"Node name for S&R": "OAIAPI_Client"
},
"widgets_values": [
"http://localhost:11434/v1/",
2,
600,
"-"
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 2,
"type": "PreviewAny",
"pos": [
1944.2304372735991,
424.5453418398783
],
"size": [
305.8110360283026,
173.1634419460412
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{
"name": "source",
"type": "*",
"link": 1
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.12.3",
"Node name for S&R": "PreviewAny"
},
"widgets_values": [
null,
null,
null
]
},
{
"id": 3,
"type": "OAIAPI_ChatCompletion",
"pos": [
1566.4133360039202,
424.5453418398783
],
"size": [
343.83210292308524,
250
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [
{
"label": "API Client",
"name": "client",
"type": "OAIAPI_CLIENT",
"link": 2
},
{
"label": "History",
"name": "history",
"shape": 7,
"type": "OAIAPI_HISTORY",
"link": null
},
{
"label": "Options",
"name": "options",
"shape": 7,
"type": "OAIAPI_OPTIONS",
"link": null
},
{
"label": "image(s)",
"name": "images",
"shape": 7,
"type": "IMAGE",
"link": null
}
],
"outputs": [
{
"name": "Response",
"type": "STRING",
"links": [
1
]
},
{
"name": "History",
"type": "OAIAPI_HISTORY",
"links": []
}
],
"properties": {
"cnr_id": "openai-api",
"ver": "2.0.1",
"Node name for S&R": "OAIAPI_ChatCompletion"
},
"widgets_values": [
"qwen3-vl:8b",
false,
"ComfyUIについて3行で説明してくれる?",
""
],
"color": "#232",
"bgcolor": "#353"
}
],
"links": [
[
1,
3,
0,
2,
0,
"STRING"
],
[
2,
1,
0,
3,
0,
"OAIAPI_CLIENT"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.7385846227941185,
"offset": [
-835.8480972173263,
335.0155570557643
]
},
"frontendVersion": "1.38.13",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
base_url:http://localhost:11434/v1(Ollamaのデフォルトアドレスです)api_key: Ollamaの場合は不要です。model: 先ほどダウンロードしたモデル名(qwen3-vl:8bなど)を入力しますsystem_prompt: 無くても良い
あとはノードの上の入力欄にチャットを書いて ▷Run してみてください。
チャットを続ける
このノードは内部に“記憶”を持ちません。
会話を続けたい場合は、前のノードの History を次のノードの History に接続して、過去ログを毎回いっしょに送ります。

{
"id": "8a210cef-17e0-42bc-8b0e-871c038c469a",
"revision": 0,
"last_node_id": 5,
"last_link_id": 5,
"nodes": [
{
"id": 1,
"type": "OAIAPI_Client",
"pos": [
1392.3178466756317,
226.8699563875366
],
"size": [
267.183749569263,
130
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "API Client",
"type": "OAIAPI_CLIENT",
"links": [
1,
4
]
}
],
"properties": {
"cnr_id": "openai-api",
"ver": "2.0.1",
"Node name for S&R": "OAIAPI_Client"
},
"widgets_values": [
"http://localhost:11434/v1/",
2,
600,
"-"
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 2,
"type": "OAIAPI_ChatCompletion",
"pos": [
1701.807435628811,
226.8699563875366
],
"size": [
343.83210292308524,
250
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [
{
"label": "API Client",
"name": "client",
"type": "OAIAPI_CLIENT",
"link": 1
},
{
"label": "History",
"name": "history",
"shape": 7,
"type": "OAIAPI_HISTORY",
"link": null
},
{
"label": "Options",
"name": "options",
"shape": 7,
"type": "OAIAPI_OPTIONS",
"link": null
},
{
"label": "image(s)",
"name": "images",
"shape": 7,
"type": "IMAGE",
"link": null
}
],
"outputs": [
{
"name": "Response",
"type": "STRING",
"links": [
3
]
},
{
"name": "History",
"type": "OAIAPI_HISTORY",
"links": [
5
]
}
],
"properties": {
"cnr_id": "openai-api",
"ver": "2.0.1",
"Node name for S&R": "OAIAPI_ChatCompletion"
},
"widgets_values": [
"qwen3-vl:8b",
false,
"ComfyUIについて3行で説明してくれる?",
""
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 3,
"type": "PreviewAny",
"pos": [
2079.6245368984896,
553.2104450771485
],
"size": [
305.8110360283026,
173.1634419460412
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "source",
"type": "*",
"link": 2
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.12.3",
"Node name for S&R": "PreviewAny"
},
"widgets_values": [
null,
null,
null
]
},
{
"id": 4,
"type": "PreviewAny",
"pos": [
2079.6245368984896,
226.8699563875366
],
"size": [
305.8110360283026,
173.1634419460412
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{
"name": "source",
"type": "*",
"link": 3
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.12.3",
"Node name for S&R": "PreviewAny"
},
"widgets_values": [
null,
null,
null
]
},
{
"id": 5,
"type": "OAIAPI_ChatCompletion",
"pos": [
1705.9130536119496,
553.2104450771485
],
"size": [
343.83210292308524,
250
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"label": "API Client",
"name": "client",
"type": "OAIAPI_CLIENT",
"link": 4
},
{
"label": "History",
"name": "history",
"shape": 7,
"type": "OAIAPI_HISTORY",
"link": 5
},
{
"label": "Options",
"name": "options",
"shape": 7,
"type": "OAIAPI_OPTIONS",
"link": null
},
{
"label": "image(s)",
"name": "images",
"shape": 7,
"type": "IMAGE",
"link": null
}
],
"outputs": [
{
"name": "Response",
"type": "STRING",
"links": [
2
]
},
{
"name": "History",
"type": "OAIAPI_HISTORY",
"links": null
}
],
"properties": {
"cnr_id": "openai-api",
"ver": "2.0.1",
"Node name for S&R": "OAIAPI_ChatCompletion"
},
"widgets_values": [
"qwen3-vl:8b",
false,
"それを英語に翻訳してください。",
""
],
"color": "#432",
"bgcolor": "#653"
}
],
"links": [
[
1,
1,
0,
2,
0,
"OAIAPI_CLIENT"
],
[
2,
5,
0,
3,
0,
"STRING"
],
[
3,
2,
0,
4,
0,
"STRING"
],
[
4,
1,
0,
5,
0,
"OAIAPI_CLIENT"
],
[
5,
2,
1,
5,
1,
"OAIAPI_HISTORY"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.9830561329389721,
"offset": [
-1048.7993731789354,
224.39066423940017
]
},
"frontendVersion": "1.38.13",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
- 🟨前のノードの
Historyから次のノードのHistoryへつなぐ
画像入力
Qwen3 VLのような画像も理解できるMLLMを使っていれば、画像を入力してそれに対して何かを聞くということも出来ます。

{
"id": "5be6d03e-cb7b-47ae-8cf7-3a4c7e7780c3",
"revision": 0,
"last_node_id": 11,
"last_link_id": 10,
"nodes": [
{
"id": 1,
"type": "OAIAPI_Client",
"pos": [
1256.9237470507412,
424.5453418398783
],
"size": [
267.183749569263,
130
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "API Client",
"type": "OAIAPI_CLIENT",
"links": [
2
]
}
],
"properties": {
"cnr_id": "openai-api",
"ver": "2.0.1",
"Node name for S&R": "OAIAPI_Client"
},
"widgets_values": [
"http://localhost:11434/v1/",
2,
600,
"-"
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 2,
"type": "PreviewAny",
"pos": [
1944.2304372735991,
424.5453418398783
],
"size": [
305.8110360283026,
173.1634419460412
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "source",
"type": "*",
"link": 1
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.12.3",
"Node name for S&R": "PreviewAny"
},
"widgets_values": [
null,
null,
null
]
},
{
"id": 3,
"type": "OAIAPI_ChatCompletion",
"pos": [
1566.4133360039202,
424.5453418398783
],
"size": [
343.83210292308524,
250
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"label": "API Client",
"name": "client",
"type": "OAIAPI_CLIENT",
"link": 2
},
{
"label": "History",
"name": "history",
"shape": 7,
"type": "OAIAPI_HISTORY",
"link": null
},
{
"label": "Options",
"name": "options",
"shape": 7,
"type": "OAIAPI_OPTIONS",
"link": null
},
{
"label": "image(s)",
"name": "images",
"shape": 7,
"type": "IMAGE",
"link": 10
}
],
"outputs": [
{
"name": "Response",
"type": "STRING",
"links": [
1
]
},
{
"name": "History",
"type": "OAIAPI_HISTORY",
"links": []
}
],
"properties": {
"cnr_id": "openai-api",
"ver": "2.0.1",
"Node name for S&R": "OAIAPI_ChatCompletion"
},
"widgets_values": [
"qwen3-vl:8b",
false,
"この二枚に共通する特徴を一つ挙げてください",
""
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 9,
"type": "LoadImage",
"pos": [
808.7037790694108,
625.4916680853971
],
"size": [
249.24696178576028,
336.37919002064325
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
8
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.12.3",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"run_021_1x1_0025_00001_.png",
"image"
]
},
{
"id": 11,
"type": "BatchImagesNode",
"pos": [
1354.8770278700042,
625.4916680853971
],
"size": [
169.23046875,
66
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"label": "image0",
"name": "images.image0",
"type": "IMAGE",
"link": 8
},
{
"label": "image1",
"name": "images.image1",
"type": "IMAGE",
"link": 9
},
{
"label": "image2",
"name": "images.image2",
"shape": 7,
"type": "IMAGE",
"link": null
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
10
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.12.3",
"Node name for S&R": "BatchImagesNode"
},
"color": "#223",
"bgcolor": "#335"
},
{
"id": 10,
"type": "LoadImage",
"pos": [
1081.2841599836242,
723.601981344597
],
"size": [
249.24696178576028,
336.37919002064325
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
9
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.12.3",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"run_021_1x1_0006_00001_.png",
"image"
]
}
],
"links": [
[
1,
3,
0,
2,
0,
"STRING"
],
[
2,
1,
0,
3,
0,
"OAIAPI_CLIENT"
],
[
8,
9,
0,
11,
0,
"IMAGE"
],
[
9,
10,
0,
11,
1,
"IMAGE"
],
[
10,
11,
0,
3,
3,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 1.0813617462328695,
"offset": [
-502.96365316369327,
-103.40033778798194
]
},
"frontendVersion": "1.38.13",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
image(s)に画像を入力- 🟦複数枚入力したいときは
Batch Imagesで連結してから入力します
プロンプト生成 → 画像生成
せっかくなので、入力した画像からプロンプトを作成してもらい、同じような画像を作ってもらいましょう。

{
"id": "d8034549-7e0a-40f1-8c2e-de3ffc6f1cae",
"revision": 0,
"last_node_id": 62,
"last_link_id": 108,
"nodes": [
{
"id": 8,
"type": "VAEDecode",
"pos": [
1252.432861328125,
188.1918182373047
],
"size": [
157.56002807617188,
46
],
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 35
},
{
"name": "vae",
"type": "VAE",
"link": 76
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"slot_index": 0,
"links": [
101
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.33",
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 38,
"type": "CLIPLoader",
"pos": [
56.288665771484375,
312.74468994140625
],
"size": [
301.3524169921875,
106
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CLIP",
"type": "CLIP",
"slot_index": 0,
"links": [
74,
75
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.33",
"Node name for S&R": "CLIPLoader"
},
"widgets_values": [
"qwen_3_4b.safetensors",
"lumina2",
"default"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 7,
"type": "CLIPTextEncode",
"pos": [
415,
405.392333984375
],
"size": [
418.3189392089844,
107.08506774902344
],
"flags": {
"collapsed": true
},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 75
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
52
]
}
],
"title": "CLIP Text Encode (Negative Prompt)",
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.33",
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
]
},
{
"id": 37,
"type": "UNETLoader",
"pos": [
267.6552734375,
53.0477294921875
],
"size": [
305.3782043457031,
82
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"slot_index": 0,
"links": [
99
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.33",
"Node name for S&R": "UNETLoader"
},
"widgets_values": [
"Z-Image\\z_image_turbo_bf16.safetensors",
"fp8_e4m3fn"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 54,
"type": "ModelSamplingAuraFlow",
"pos": [
603.9390258789062,
53.0477294921875
],
"size": [
230.33058166503906,
58
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 99
}
],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
100
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.49",
"Node name for S&R": "ModelSamplingAuraFlow"
},
"widgets_values": [
3.1
]
},
{
"id": 39,
"type": "VAELoader",
"pos": [
977.9548217773436,
68.20164184570308
],
"size": [
235.80000000000018,
58
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"slot_index": 0,
"links": [
76
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.33",
"Node name for S&R": "VAELoader"
},
"widgets_values": [
"ae.safetensors"
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 3,
"type": "KSampler",
"pos": [
898.7548217773438,
188.1918182373047
],
"size": [
315,
262
],
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 100
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 46
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 52
},
{
"name": "latent_image",
"type": "LATENT",
"link": 98
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"slot_index": 0,
"links": [
35
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.33",
"Node name for S&R": "KSampler"
},
"widgets_values": [
1234,
"fixed",
8,
1,
"euler",
"simple",
1
]
},
{
"id": 57,
"type": "OAIAPI_Client",
"pos": [
-417.7513558712079,
-213.2272865295409
],
"size": [
267.183749569263,
130
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "API Client",
"type": "OAIAPI_CLIENT",
"links": [
103
]
}
],
"properties": {
"cnr_id": "openai-api",
"ver": "2.0.1",
"Node name for S&R": "OAIAPI_Client"
},
"widgets_values": [
"http://localhost:11434/v1/",
2,
600,
"-"
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 58,
"type": "PreviewAny",
"pos": [
267.6552734375,
-213.2272865295409
],
"size": [
305.8110360283026,
173.1634419460412
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "source",
"type": "*",
"link": 102
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.12.3",
"Node name for S&R": "PreviewAny"
},
"widgets_values": [
null,
null,
null
]
},
{
"id": 6,
"type": "CLIPTextEncode",
"pos": [
415,
186
],
"size": [
419.26959228515625,
156.00363159179688
],
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 74
},
{
"name": "text",
"type": "STRING",
"widget": {
"name": "text"
},
"link": 108
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
46
]
}
],
"title": "CLIP Text Encode (Positive Prompt)",
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.33",
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
]
},
{
"id": 60,
"type": "LoadImage",
"pos": [
-417.7513558712079,
-12.280960284022356
],
"size": [
268.283749569263,
326
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
107
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.12.3",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"run_019_4x3_0097_00001_.png",
"image"
]
},
{
"id": 59,
"type": "OAIAPI_ChatCompletion",
"pos": [
-113.37221789376508,
-213.2272865295409
],
"size": [
343.83210292308524,
250
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"label": "API Client",
"name": "client",
"type": "OAIAPI_CLIENT",
"link": 103
},
{
"label": "History",
"name": "history",
"shape": 7,
"type": "OAIAPI_HISTORY",
"link": null
},
{
"label": "Options",
"name": "options",
"shape": 7,
"type": "OAIAPI_OPTIONS",
"link": null
},
{
"label": "image(s)",
"name": "images",
"shape": 7,
"type": "IMAGE",
"link": 107
}
],
"outputs": [
{
"name": "Response",
"type": "STRING",
"links": [
102,
108
]
},
{
"name": "History",
"type": "OAIAPI_HISTORY",
"links": []
}
],
"properties": {
"cnr_id": "openai-api",
"ver": "2.0.1",
"Node name for S&R": "OAIAPI_ChatCompletion"
},
"widgets_values": [
"qwen3-vl:8b",
false,
"Please generate a text prompt to create this image.",
"You are an assistant that writes a single image-generation prompt for Z-Image based on the user-provided image. Your goal is maximum visual fidelity to the input image.\n\nOutput only the prompt itself, in natural English prose. Do not include any preface, labels, bullet points, explanations, or formatting.\n\nDescribe what is actually visible in the image, without inventing new objects, characters, text, logos, or story elements. When you must infer something uncertain, phrase it cautiously (e.g., “appears to be,” “suggesting,” “likely”).\n\nMake sure your prompt clearly covers:\n\n* The main subject and key details (identity/type, pose, expression, orientation, clothing or defining features).\n* The camera and composition (distance, angle, framing, perspective, depth of field).\n* The setting/background (location cues, surrounding objects, sense of depth, time of day/season if evident).\n* Lighting (source direction, softness/hardness, color temperature, shadow behavior).\n* Color palette and materials (dominant colors, textures, reflectivity/roughness, fabric/skin/metal/glass characteristics).\n* The image’s style (photo/illustration/3D/anime, line quality, shading/painting/rendering traits).\n* The overall mood/atmosphere.\n\nEnd with one final sentence that states positive, natural constraints to preserve coherence and prevent common artifacts, without using “no …” phrasing.\n"
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 53,
"type": "EmptySD3LatentImage",
"pos": [
597.2695922851562,
482.05751390379885
],
"size": [
237,
106
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
98
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.49",
"Node name for S&R": "EmptySD3LatentImage"
},
"widgets_values": [
1472,
1104,
1
]
},
{
"id": 56,
"type": "SaveImage",
"pos": [
1443.3798111474612,
192.6578574704594
],
"size": [
560.6479999999997,
500.67599999999993
],
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 101
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.75"
},
"widgets_values": [
"ComfyUI"
]
}
],
"links": [
[
35,
3,
0,
8,
0,
"LATENT"
],
[
46,
6,
0,
3,
1,
"CONDITIONING"
],
[
52,
7,
0,
3,
2,
"CONDITIONING"
],
[
74,
38,
0,
6,
0,
"CLIP"
],
[
75,
38,
0,
7,
0,
"CLIP"
],
[
76,
39,
0,
8,
1,
"VAE"
],
[
98,
53,
0,
3,
3,
"LATENT"
],
[
99,
37,
0,
54,
0,
"MODEL"
],
[
100,
54,
0,
3,
0,
"MODEL"
],
[
101,
8,
0,
56,
0,
"IMAGE"
],
[
102,
59,
0,
58,
0,
"STRING"
],
[
103,
57,
0,
59,
0,
"OAIAPI_CLIENT"
],
[
107,
60,
0,
59,
3,
"IMAGE"
],
[
108,
59,
0,
6,
1,
"STRING"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.6209213230591554,
"offset": [
903.4750464307022,
893.2631918092898
]
},
"frontendVersion": "1.38.13",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
- システムプロンプトで「そのまま使える画像生成のプロンプト」を出力するようにフォーマットを指定しておくと良いでしょう。
- あとは出力を
CLIP Text Encodeにつなぐだけです。