Files
smthemex-ComfyUI_KV_Edit/example_workflows/kv_edit.json
T
2026-10-25 11:27:29 +08:00

1057 lines
19 KiB
JSON

{
"id": "4be48bc0-f21c-45cb-b657-bb75df5d398c",
"revision": 0,
"last_node_id": 153,
"last_link_id": 280,
"nodes": [
{
"id": 47,
"type": "LoadImage",
"pos": [
-902.3455950916546,
-138.68348044554008
],
"size": [
280,
350
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
272
]
},
{
"name": "MASK",
"type": "MASK",
"links": [
280
]
}
],
"properties": {
"Node name for S&R": "LoadImage",
"cnr_id": "comfy-core",
"ver": "0.3.56",
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65,
"image": "clipspace-painted-masked-1792896542096.png [input]"
},
"widgets_values": [
"clipspace-painted-masked-1792896542096.png [input]",
"image"
],
"widgets_values_named": {
"image": "clipspace-painted-masked-1792896542096.png [input]",
"upload": "image"
}
},
{
"id": 9,
"type": "SaveImage",
"pos": [
695.6548865255436,
-327.03028905220174
],
"size": [
590,
470
],
"flags": {},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 244
}
],
"outputs": [
{
"name": "images",
"type": "IMAGE",
"links": null
}
],
"properties": {
"Node name for S&R": "SaveImage",
"cnr_id": "comfy-core",
"ver": "0.3.56",
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65
},
"widgets_values": [
"ComfyUI"
],
"widgets_values_named": {
"filename_prefix": "ComfyUI"
}
},
{
"id": 128,
"type": "LoraLoaderModelOnly",
"pos": [
-361.86209650814203,
-622.0800469844089
],
"size": [
320,
130
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 249
}
],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
259
]
}
],
"properties": {
"Node name for S&R": "LoraLoaderModelOnly",
"cnr_id": "comfy-core",
"ver": "0.3.56",
"models": [
{
"name": "uso-flux1-dit-lora-v1.safetensors",
"url": "https://huggingface.co/Comfy-Org/USO_1.0_Repackaged/resolve/main/split_files/loras/uso-flux1-dit-lora-v1.safetensors",
"directory": "loras"
}
],
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65
},
"widgets_values": [
"flux-turbo.safetensors",
1
],
"widgets_values_named": {
"lora_name": "flux-turbo.safetensors",
"strength_model": 1
}
},
{
"id": 129,
"type": "VAEEncode",
"pos": [
140.72861317695651,
-369.44929724622295
],
"size": [
225,
46
],
"flags": {
"collapsed": false
},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "pixels",
"type": "IMAGE",
"link": 273
},
{
"name": "vae",
"type": "VAE",
"link": 254
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
260
]
}
],
"properties": {
"Node name for S&R": "VAEEncode",
"cnr_id": "comfy-core",
"ver": "0.3.56",
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65
}
},
{
"id": 131,
"type": "VAEDecode",
"pos": [
777.0732034107706,
-483.5270310028836
],
"size": [
230,
80
],
"flags": {},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 261
},
{
"name": "vae",
"type": "VAE",
"link": 255
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"slot_index": 0,
"links": [
244
]
}
],
"properties": {
"Node name for S&R": "VAEDecode",
"cnr_id": "comfy-core",
"ver": "0.3.56",
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65
}
},
{
"id": 137,
"type": "CLIPTextEncode",
"pos": [
-284.4484713788996,
-451.70953785416253
],
"size": [
430,
170
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 250
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
252
]
}
],
"title": "source",
"properties": {
"Node name for S&R": "CLIPTextEncode",
"cnr_id": "comfy-core",
"ver": "0.3.56",
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65
},
"widgets_values": [
"in a cluttered wooden cabin,a workbench holds a green neon sign that reads 'I love here'"
],
"widgets_values_named": {
"text": "in a cluttered wooden cabin,a workbench holds a green neon sign that reads 'I love here'"
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 140,
"type": "UNETLoader",
"pos": [
-738.0461181441357,
-555.4273092424494
],
"size": [
270,
82
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
249
]
}
],
"properties": {
"Node name for S&R": "UNETLoader"
},
"widgets_values": [
"flux1-dev-fp8.safetensors",
"default"
],
"widgets_values_named": {
"unet_name": "flux1-dev-fp8.safetensors",
"weight_dtype": "default"
}
},
{
"id": 141,
"type": "DualCLIPLoader",
"pos": [
-618.3813742631618,
-410.0118432150683
],
"size": [
270,
130
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CLIP",
"type": "CLIP",
"links": [
250,
263
]
}
],
"properties": {
"Node name for S&R": "DualCLIPLoader"
},
"widgets_values": [
"clip_l.safetensors",
"t5xxl_fp8_e4m3fn_scaled.safetensors",
"flux",
"default"
],
"widgets_values_named": {
"clip_name1": "clip_l.safetensors",
"clip_name2": "t5xxl_fp8_e4m3fn_scaled.safetensors",
"type": "flux",
"device": "default"
}
},
{
"id": 142,
"type": "FluxGuidance",
"pos": [
388.2594774388833,
-649.0446265299108
],
"size": [
270,
58
],
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "conditioning",
"type": "CONDITIONING",
"link": 252
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
257
]
}
],
"properties": {
"Node name for S&R": "FluxGuidance"
},
"widgets_values": [
3.5
],
"widgets_values_named": {
"guidance": 3.5
}
},
{
"id": 143,
"type": "VAELoader",
"pos": [
151.41268380847941,
-30.110831322144065
],
"size": [
270,
58
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"links": [
254,
255
]
}
],
"properties": {
"Node name for S&R": "VAELoader"
},
"widgets_values": [
"ae.safetensors"
],
"widgets_values_named": {
"vae_name": "ae.safetensors"
}
},
{
"id": 144,
"type": "KV_Edit_Sample",
"pos": [
378.50734113089607,
-509.6462052169418
],
"size": [
285.769140625,
378
],
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 259
},
{
"name": "source_conditioning",
"type": "CONDITIONING",
"link": 257
},
{
"name": "target_conditioning",
"type": "CONDITIONING",
"link": 258
},
{
"name": "latent_image",
"type": "LATENT",
"link": 260
},
{
"name": "mask",
"type": "MASK",
"link": 268
}
],
"outputs": [
{
"name": "latent",
"type": "LATENT",
"links": [
261
]
}
],
"properties": {
"Node name for S&R": "KV_Edit_Sample"
},
"widgets_values": [
8,
1,
1,
false,
true,
1.5,
5,
907370949220832,
"randomize",
false,
true
],
"widgets_values_named": {
"steps": 8,
"skip_step": 1,
"attn_scale": 1,
"attn_mask": false,
"use_inf": true,
"source_guidance": 1.5,
"target_guidance": 5,
"seed": 907370949220832,
"control_after_generate": "randomize",
"re_init": false,
"kv_offload": true
}
},
{
"id": 145,
"type": "CLIPTextEncode",
"pos": [
-298.01912872035336,
-241.13283825897412
],
"size": [
430,
170
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 263
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
258
]
}
],
"title": "target",
"properties": {
"Node name for S&R": "CLIPTextEncode",
"cnr_id": "comfy-core",
"ver": "0.3.56",
"enableTabs": false,
"tabWidth": 65,
"tabXOffset": 10,
"hasSecondTab": false,
"secondTabText": "Send Back",
"secondTabOffset": 80,
"secondTabWidth": 65
},
"widgets_values": [
"n a cluttered wooden cabin,a workbench holds a green neon sign that reads 'I love nana'"
],
"widgets_values_named": {
"text": "n a cluttered wooden cabin,a workbench holds a green neon sign that reads 'I love nana'"
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 147,
"type": "MaskToImage",
"pos": [
-574.9405435081882,
14.376558240250063
],
"size": [
140,
26
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "mask",
"type": "MASK",
"link": 280
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
274
]
}
],
"properties": {
"Node name for S&R": "MaskToImage"
}
},
{
"id": 148,
"type": "ImageToMask",
"pos": [
4.650681677379339,
108.66051555049967
],
"size": [
270,
58
],
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 275
}
],
"outputs": [
{
"name": "MASK",
"type": "MASK",
"links": [
268
]
}
],
"properties": {
"Node name for S&R": "ImageToMask"
},
"widgets_values": [
"red"
],
"widgets_values_named": {
"channel": "red"
}
},
{
"id": 151,
"type": "ImageScale",
"pos": [
-596.4802459498732,
-204.35487587265945
],
"size": [
270,
130
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 272
},
{
"name": "width",
"type": "INT",
"widget": {
"name": "width"
},
"link": 276
},
{
"name": "height",
"type": "INT",
"widget": {
"name": "height"
},
"link": 277
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
273
]
}
],
"properties": {
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"nearest-exact",
512,
512,
"disabled"
],
"widgets_values_named": {
"upscale_method": "nearest-exact",
"width": 512,
"height": 512,
"crop": "disabled"
}
},
{
"id": 152,
"type": "ImageScale",
"pos": [
-284.864818435806,
-5.229017320593783
],
"size": [
270,
130
],
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 274
},
{
"name": "width",
"type": "INT",
"widget": {
"name": "width"
},
"link": 278
},
{
"name": "height",
"type": "INT",
"widget": {
"name": "height"
},
"link": 279
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
275
]
}
],
"properties": {
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"nearest-exact",
512,
512,
"disabled"
],
"widgets_values_named": {
"upscale_method": "nearest-exact",
"width": 512,
"height": 512,
"crop": "disabled"
}
},
{
"id": 153,
"type": "ResolutionSelector",
"pos": [
-882.4967017302263,
-361.51162931120695
],
"size": [
270,
150
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "width",
"type": "INT",
"links": [
276,
278
]
},
{
"name": "height",
"type": "INT",
"links": [
277,
279
]
}
],
"properties": {
"Node name for S&R": "ResolutionSelector"
},
"widgets_values": [
"1:1 (Square)",
1,
8
],
"widgets_values_named": {
"aspect_ratio": "1:1 (Square)",
"megapixels": 1,
"multiple": 8
}
}
],
"links": [
[
244,
131,
0,
9,
0,
"IMAGE"
],
[
249,
140,
0,
128,
0,
"MODEL"
],
[
250,
141,
0,
137,
0,
"CLIP"
],
[
252,
137,
0,
142,
0,
"CONDITIONING"
],
[
254,
143,
0,
129,
1,
"VAE"
],
[
255,
143,
0,
131,
1,
"VAE"
],
[
257,
142,
0,
144,
1,
"CONDITIONING"
],
[
258,
145,
0,
144,
2,
"CONDITIONING"
],
[
259,
128,
0,
144,
0,
"MODEL"
],
[
260,
129,
0,
144,
3,
"LATENT"
],
[
261,
144,
0,
131,
0,
"LATENT"
],
[
263,
141,
0,
145,
0,
"CLIP"
],
[
268,
148,
0,
144,
4,
"MASK"
],
[
272,
47,
0,
151,
0,
"IMAGE"
],
[
273,
151,
0,
129,
0,
"IMAGE"
],
[
274,
147,
0,
152,
0,
"IMAGE"
],
[
275,
152,
0,
148,
0,
"IMAGE"
],
[
276,
153,
0,
151,
1,
"INT"
],
[
277,
153,
1,
151,
2,
"INT"
],
[
278,
153,
0,
152,
1,
"INT"
],
[
279,
153,
1,
152,
2,
"INT"
],
[
280,
47,
1,
147,
0,
"MASK"
]
],
"groups": [
{
"id": 16,
"title": "Group",
"bounding": [
-886.9152524376674,
-714.7275296695179,
2209.1143684957915,
945.1990765073683
],
"color": "#3f789e",
"flags": {}
}
],
"config": {},
"extra": {
"ds": {
"scale": 0.7887664452380956,
"offset": [
1111.4120756318098,
868.7564201759146
]
},
"frontendVersion": "1.57.1",
"workflowRendererVersion": "LG",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}