ComfyUIでは、主にプロンプトとしてテキストを扱います。
文字列の一部を置き換えたり、LLMが作成したプロンプトにトリガーワードをくっつけたりと、いくつかの操作を自動化することでワークフローがより便利になります。
Power_Puter_(rgthree)_Replace.json
{
"id": "dc1f9613-0a4c-46fb-ae08-9962d0e06147",
"revision": 0,
"last_node_id": 15,
"last_link_id": 13,
"nodes": [
{
"id": 3,
"type": "PreviewAny",
"pos": [
2010.7783203125,
740.6680297851562
],
"size": [
210,
122.44491577148438
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "source",
"type": "*",
"link": 10
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.59",
"Node name for S&R": "PreviewAny"
},
"widgets_values": []
},
{
"id": 13,
"type": "PrimitiveString",
"pos": [
1447.3487548828125,
924.7716674804688
],
"size": [
210,
58
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "STRING",
"type": "STRING",
"links": [
11
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.59",
"Node name for S&R": "PrimitiveString"
},
"widgets_values": [
"apple"
]
},
{
"id": 15,
"type": "PrimitiveStringMultiline",
"pos": [
1382.8033447265625,
740.6680297851562
],
"size": [
274.5454406738281,
121.81818389892578
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "STRING",
"type": "STRING",
"links": [
13
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.59",
"Node name for S&R": "PrimitiveStringMultiline"
},
"widgets_values": [
"apple pen"
]
},
{
"id": 14,
"type": "PrimitiveString",
"pos": [
1447.3487548828125,
1045.05712890625
],
"size": [
210,
58
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "STRING",
"type": "STRING",
"links": [
12
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.59",
"Node name for S&R": "PrimitiveString"
},
"widgets_values": [
"pineapple"
]
},
{
"id": 11,
"type": "Power Puter (rgthree)",
"pos": [
1703.1837158203125,
740.6680297851562
],
"size": [
261.7596435546875,
176
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "a",
"type": "*",
"link": 13
},
{
"name": "b",
"type": "*",
"link": 11
},
{
"name": "c",
"type": "*",
"link": 12
},
{
"name": "d",
"type": "*",
"link": null
}
],
"outputs": [
{
"label": "STRING",
"name": "*",
"shape": 3,
"type": "STRING",
"links": [
10
]
}
],
"properties": {
"cnr_id": "rgthree-comfy",
"ver": "0fb1e239a903e93ef626a8c20589b38f46e39dff"
},
"widgets_values": [
{
"outputs": [
"STRING"
]
},
"return a.replace(b, c)"
],
"color": "#232",
"bgcolor": "#353"
}
],
"links": [
[
10,
11,
0,
3,
0,
"*"
],
[
11,
13,
0,
11,
1,
"*"
],
[
12,
14,
0,
11,
2,
"*"
],
[
13,
15,
0,
11,
0,
"*"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 1.4641000000000008,
"offset": [
-1282.8033447265625,
-640.6680297851562
]
},
"frontendVersion": "1.27.5",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}