├── .github └── workflows │ └── publish.yml ├── README.md ├── __init__.py ├── example ├── flux Material transfer+depth.json ├── flux redux 2image.json └── redux semantic replacement image 1206.json ├── nodes.py └── pyproject.toml /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: Publish to Comfy registry 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: 6 | - main 7 | - master 8 | paths: 9 | - "pyproject.toml" 10 | 11 | jobs: 12 | publish-node: 13 | name: Publish Custom Node to registry 14 | runs-on: ubuntu-latest 15 | # if this is a forked repository. Skipping the workflow. 16 | if: github.event.repository.fork == false 17 | steps: 18 | - name: Check out code 19 | uses: actions/checkout@v4 20 | with: 21 | submodules: true 22 | - name: Publish Custom Node 23 | uses: Comfy-Org/publish-node-action@main 24 | with: 25 | ## Add your own personal access token to your Github Repository secrets and reference it here. 26 | personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }} 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Comfyui_Flux_Style_Adjust (Redux) 2 | StyleModelApply adds more controls 3 | 4 | https://github.com/yichengup/Comfyui_Redux_Advanced 5 | Another Redux plugin of mine, this is an improved version, welcome to use it 6 | 7 | Note: Sorry, there is no basis for this weight separation, I just want to try it out for learning. 8 | The image weight is low, and the prompt word can only replace the image features with similar semantics. 9 | In addition, you can use it as a multi-node series to mix the images together for fun. 10 | This is an inaccurate node. 11 | 12 | ![image](https://github.com/user-attachments/assets/12fa2fb0-873c-4ca2-a53a-a417eb342c20) 13 | 14 | 2024/12/03 update:two image redux fusion+depth 15 | ![image](https://github.com/user-attachments/assets/5cff3165-05c3-47b0-816b-8ff644e0e83f) 16 | 17 | 2024/12/03 update:(Replace similar Redux image features with semantic features) 18 | -- prompt words:((( Snowy scene))),(((pig head))), 19 | ![image](https://github.com/user-attachments/assets/30d7655d-77c8-4b59-bfcc-c5e25c79dfdc) 20 | 21 | ![image](https://github.com/user-attachments/assets/36a37758-b7f7-4dd4-8934-c67609875879) 22 | 23 | two image redux fusion 24 | ![image](https://github.com/user-attachments/assets/29834407-01ce-4240-aabb-7dfea0a71e69) 25 | 26 | ![image](https://github.com/user-attachments/assets/ebfce090-fd92-4d25-b5a9-e4da8212a256) 27 | -------------------------------------------------------------------------------- /__init__.py: -------------------------------------------------------------------------------- 1 | from .nodes import StyleModelAdvancedApply 2 | 3 | NODE_CLASS_MAPPINGS = { 4 | "StyleModelAdvancedApply": StyleModelAdvancedApply, 5 | } 6 | 7 | NODE_DISPLAY_NAME_MAPPINGS = { 8 | "StyleModelAdvancedApply": "Style Model Advanced Apply", 9 | } 10 | 11 | __all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS'] 12 | -------------------------------------------------------------------------------- /example/flux Material transfer+depth.json: -------------------------------------------------------------------------------- 1 | { 2 | "last_node_id": 253, 3 | "last_link_id": 415, 4 | "nodes": [ 5 | { 6 | "id": 101, 7 | "type": "CLIPVisionEncode", 8 | "pos": [ 9 | -593.3097534179688, 10 | -2602.016845703125 11 | ], 12 | "size": [ 13 | 380.4000244140625, 14 | 78 15 | ], 16 | "flags": {}, 17 | "order": 12, 18 | "mode": 0, 19 | "inputs": [ 20 | { 21 | "name": "clip_vision", 22 | "type": "CLIP_VISION", 23 | "link": 186, 24 | "label": "clip_vision" 25 | }, 26 | { 27 | "name": "image", 28 | "type": "IMAGE", 29 | "link": 187, 30 | "label": "image" 31 | } 32 | ], 33 | "outputs": [ 34 | { 35 | "name": "CLIP_VISION_OUTPUT", 36 | "type": "CLIP_VISION_OUTPUT", 37 | "links": [ 38 | 196 39 | ], 40 | "label": "CLIP_VISION_OUTPUT" 41 | } 42 | ], 43 | "properties": { 44 | "Node name for S&R": "CLIPVisionEncode", 45 | "ttNbgOverride": { 46 | "color": "#af3535", 47 | "groupcolor": "#A88" 48 | } 49 | }, 50 | "widgets_values": [ 51 | "none" 52 | ], 53 | "color": "#af3535" 54 | }, 55 | { 56 | "id": 104, 57 | "type": "CLIPTextEncode", 58 | "pos": [ 59 | -549.6141357421875, 60 | -2235.318359375 61 | ], 62 | "size": [ 63 | 422.84503173828125, 64 | 164.31304931640625 65 | ], 66 | "flags": {}, 67 | "order": 11, 68 | "mode": 0, 69 | "inputs": [ 70 | { 71 | "name": "clip", 72 | "type": "CLIP", 73 | "link": 190, 74 | "label": "clip" 75 | }, 76 | { 77 | "name": "text", 78 | "type": "STRING", 79 | "link": 191, 80 | "widget": { 81 | "name": "text" 82 | }, 83 | "label": "text" 84 | } 85 | ], 86 | "outputs": [ 87 | { 88 | "name": "CONDITIONING", 89 | "type": "CONDITIONING", 90 | "links": [ 91 | 193, 92 | 202 93 | ], 94 | "slot_index": 0, 95 | "label": "CONDITIONING" 96 | } 97 | ], 98 | "properties": { 99 | "Node name for S&R": "CLIPTextEncode" 100 | }, 101 | "widgets_values": [ 102 | "1 girl,", 103 | [ 104 | false, 105 | true 106 | ] 107 | ], 108 | "color": "#232", 109 | "bgcolor": "#353" 110 | }, 111 | { 112 | "id": 115, 113 | "type": "InstructPixToPixConditioning", 114 | "pos": [ 115 | 860.5709838867188, 116 | -2595.61376953125 117 | ], 118 | "size": [ 119 | 235.1999969482422, 120 | 86 121 | ], 122 | "flags": {}, 123 | "order": 21, 124 | "mode": 0, 125 | "inputs": [ 126 | { 127 | "name": "positive", 128 | "type": "CONDITIONING", 129 | "link": 203, 130 | "label": "positive" 131 | }, 132 | { 133 | "name": "negative", 134 | "type": "CONDITIONING", 135 | "link": 204, 136 | "label": "negative" 137 | }, 138 | { 139 | "name": "vae", 140 | "type": "VAE", 141 | "link": 205, 142 | "label": "vae" 143 | }, 144 | { 145 | "name": "pixels", 146 | "type": "IMAGE", 147 | "link": 414, 148 | "label": "pixels" 149 | } 150 | ], 151 | "outputs": [ 152 | { 153 | "name": "positive", 154 | "type": "CONDITIONING", 155 | "links": [ 156 | 209 157 | ], 158 | "slot_index": 0, 159 | "label": "positive" 160 | }, 161 | { 162 | "name": "negative", 163 | "type": "CONDITIONING", 164 | "links": [ 165 | 210 166 | ], 167 | "slot_index": 1, 168 | "label": "negative" 169 | }, 170 | { 171 | "name": "latent", 172 | "type": "LATENT", 173 | "links": [ 174 | 211 175 | ], 176 | "slot_index": 2, 177 | "label": "latent" 178 | } 179 | ], 180 | "properties": { 181 | "Node name for S&R": "InstructPixToPixConditioning", 182 | "ttNbgOverride": { 183 | "color": "#af3535", 184 | "groupcolor": "#A88" 185 | } 186 | }, 187 | "widgets_values": [], 188 | "color": "#af3535" 189 | }, 190 | { 191 | "id": 119, 192 | "type": "VAEDecode", 193 | "pos": [ 194 | 1510.5672607421875, 195 | -2602.656005859375 196 | ], 197 | "size": [ 198 | 210, 199 | 46 200 | ], 201 | "flags": {}, 202 | "order": 23, 203 | "mode": 0, 204 | "inputs": [ 205 | { 206 | "name": "samples", 207 | "type": "LATENT", 208 | "link": 212, 209 | "label": "samples" 210 | }, 211 | { 212 | "name": "vae", 213 | "type": "VAE", 214 | "link": 213, 215 | "label": "vae" 216 | } 217 | ], 218 | "outputs": [ 219 | { 220 | "name": "IMAGE", 221 | "type": "IMAGE", 222 | "links": [ 223 | 214 224 | ], 225 | "slot_index": 0, 226 | "label": "IMAGE" 227 | } 228 | ], 229 | "properties": { 230 | "Node name for S&R": "VAEDecode", 231 | "ttNbgOverride": { 232 | "color": "#af3535", 233 | "groupcolor": "#A88" 234 | } 235 | }, 236 | "widgets_values": [], 237 | "color": "#af3535" 238 | }, 239 | { 240 | "id": 116, 241 | "type": "VAELoader", 242 | "pos": [ 243 | -991.9190673828125, 244 | -2504.16162109375 245 | ], 246 | "size": [ 247 | 315, 248 | 58 249 | ], 250 | "flags": {}, 251 | "order": 0, 252 | "mode": 0, 253 | "inputs": [], 254 | "outputs": [ 255 | { 256 | "name": "VAE", 257 | "type": "VAE", 258 | "links": [ 259 | 205, 260 | 213 261 | ], 262 | "slot_index": 0, 263 | "label": "VAE" 264 | } 265 | ], 266 | "properties": { 267 | "Node name for S&R": "VAELoader", 268 | "ttNbgOverride": { 269 | "color": "#af3535", 270 | "groupcolor": "#A88" 271 | } 272 | }, 273 | "widgets_values": [ 274 | "ae.sft" 275 | ], 276 | "color": "#af3535" 277 | }, 278 | { 279 | "id": 100, 280 | "type": "CLIPVisionLoader", 281 | "pos": [ 282 | -970.6244506835938, 283 | -2593.681884765625 284 | ], 285 | "size": [ 286 | 315, 287 | 58 288 | ], 289 | "flags": {}, 290 | "order": 1, 291 | "mode": 0, 292 | "inputs": [], 293 | "outputs": [ 294 | { 295 | "name": "CLIP_VISION", 296 | "type": "CLIP_VISION", 297 | "links": [ 298 | 186, 299 | 188 300 | ], 301 | "slot_index": 0, 302 | "label": "CLIP_VISION" 303 | } 304 | ], 305 | "properties": { 306 | "Node name for S&R": "CLIPVisionLoader", 307 | "ttNbgOverride": { 308 | "color": "#af3535", 309 | "groupcolor": "#A88" 310 | } 311 | }, 312 | "widgets_values": [ 313 | "sigclip_vision_patch14_384.safetensors" 314 | ], 315 | "color": "#af3535" 316 | }, 317 | { 318 | "id": 103, 319 | "type": "UnetLoaderGGUF", 320 | "pos": [ 321 | -1002.0895385742188, 322 | -2398.105712890625 323 | ], 324 | "size": [ 325 | 315, 326 | 58 327 | ], 328 | "flags": {}, 329 | "order": 2, 330 | "mode": 0, 331 | "inputs": [], 332 | "outputs": [ 333 | { 334 | "name": "MODEL", 335 | "type": "MODEL", 336 | "links": [ 337 | 412 338 | ], 339 | "slot_index": 0, 340 | "label": "MODEL" 341 | } 342 | ], 343 | "properties": { 344 | "Node name for S&R": "UnetLoaderGGUF", 345 | "ttNbgOverride": { 346 | "color": "#af3535", 347 | "groupcolor": "#A88" 348 | } 349 | }, 350 | "widgets_values": [ 351 | "flux1-depth-dev-fp16-Q8_0-GGUF.gguf" 352 | ], 353 | "color": "#af3535" 354 | }, 355 | { 356 | "id": 105, 357 | "type": "DualCLIPLoader", 358 | "pos": [ 359 | -988.5557861328125, 360 | -2141.2802734375 361 | ], 362 | "size": [ 363 | 315, 364 | 106 365 | ], 366 | "flags": {}, 367 | "order": 3, 368 | "mode": 0, 369 | "inputs": [], 370 | "outputs": [ 371 | { 372 | "name": "CLIP", 373 | "type": "CLIP", 374 | "links": [ 375 | 190 376 | ], 377 | "label": "CLIP" 378 | } 379 | ], 380 | "properties": { 381 | "Node name for S&R": "DualCLIPLoader", 382 | "ttNbgOverride": { 383 | "color": "#af3535", 384 | "groupcolor": "#A88" 385 | } 386 | }, 387 | "widgets_values": [ 388 | "clip_l.safetensors", 389 | "t5xxl_fp8_e4m3fn.safetensors", 390 | "flux" 391 | ], 392 | "color": "#af3535" 393 | }, 394 | { 395 | "id": 107, 396 | "type": "StyleModelLoader", 397 | "pos": [ 398 | -973.1683959960938, 399 | -1704.2919921875 400 | ], 401 | "size": [ 402 | 315, 403 | 58 404 | ], 405 | "flags": {}, 406 | "order": 4, 407 | "mode": 0, 408 | "inputs": [], 409 | "outputs": [ 410 | { 411 | "name": "STYLE_MODEL", 412 | "type": "STYLE_MODEL", 413 | "links": [ 414 | 195, 415 | 198 416 | ], 417 | "slot_index": 0, 418 | "label": "STYLE_MODEL" 419 | } 420 | ], 421 | "properties": { 422 | "Node name for S&R": "StyleModelLoader", 423 | "ttNbgOverride": { 424 | "color": "#af3535", 425 | "groupcolor": "#A88" 426 | } 427 | }, 428 | "widgets_values": [ 429 | "flux1-redux-dev.safetensors" 430 | ], 431 | "color": "#af3535" 432 | }, 433 | { 434 | "id": 112, 435 | "type": "LayerUtility: ImageScaleByAspectRatio V2", 436 | "pos": [ 437 | -1021.8609619140625, 438 | -1604.9833984375 439 | ], 440 | "size": [ 441 | 336, 442 | 330 443 | ], 444 | "flags": {}, 445 | "order": 14, 446 | "mode": 0, 447 | "inputs": [ 448 | { 449 | "name": "image", 450 | "type": "IMAGE", 451 | "link": 200, 452 | "shape": 7, 453 | "label": "image" 454 | }, 455 | { 456 | "name": "mask", 457 | "type": "MASK", 458 | "link": null, 459 | "shape": 7, 460 | "label": "mask" 461 | } 462 | ], 463 | "outputs": [ 464 | { 465 | "name": "image", 466 | "type": "IMAGE", 467 | "links": [ 468 | 413 469 | ], 470 | "slot_index": 0, 471 | "label": "image" 472 | }, 473 | { 474 | "name": "mask", 475 | "type": "MASK", 476 | "links": null, 477 | "label": "mask" 478 | }, 479 | { 480 | "name": "original_size", 481 | "type": "BOX", 482 | "links": null, 483 | "label": "original_size" 484 | }, 485 | { 486 | "name": "width", 487 | "type": "INT", 488 | "links": null, 489 | "label": "width" 490 | }, 491 | { 492 | "name": "height", 493 | "type": "INT", 494 | "links": null, 495 | "label": "height" 496 | } 497 | ], 498 | "properties": { 499 | "Node name for S&R": "LayerUtility: ImageScaleByAspectRatio V2" 500 | }, 501 | "widgets_values": [ 502 | "original", 503 | 1, 504 | 1, 505 | "letterbox", 506 | "lanczos", 507 | "8", 508 | "longest", 509 | 1024, 510 | "#000000" 511 | ], 512 | "color": "rgba(38, 73, 116, 0.7)" 513 | }, 514 | { 515 | "id": 109, 516 | "type": "StyleModelAdvancedApply", 517 | "pos": [ 518 | -67.29872131347656, 519 | -2600.173583984375 520 | ], 521 | "size": [ 522 | 393, 523 | 242 524 | ], 525 | "flags": {}, 526 | "order": 18, 527 | "mode": 0, 528 | "inputs": [ 529 | { 530 | "name": "conditioning", 531 | "type": "CONDITIONING", 532 | "link": 194, 533 | "label": "conditioning" 534 | }, 535 | { 536 | "name": "style_model", 537 | "type": "STYLE_MODEL", 538 | "link": 195, 539 | "label": "style_model" 540 | }, 541 | { 542 | "name": "clip_vision_output", 543 | "type": "CLIP_VISION_OUTPUT", 544 | "link": 196, 545 | "label": "clip_vision_output" 546 | } 547 | ], 548 | "outputs": [ 549 | { 550 | "name": "CONDITIONING", 551 | "type": "CONDITIONING", 552 | "links": [ 553 | 197 554 | ], 555 | "slot_index": 0, 556 | "label": "CONDITIONING" 557 | } 558 | ], 559 | "properties": { 560 | "Node name for S&R": "StyleModelAdvancedApply", 561 | "ttNbgOverride": { 562 | "color": "#af3535", 563 | "groupcolor": "#A88" 564 | } 565 | }, 566 | "widgets_values": [ 567 | 1, 568 | 0.7000000000000001, 569 | 1, 570 | 0.7000000000000001, 571 | 0.8, 572 | 0.7000000000000001, 573 | 1.5 574 | ], 575 | "color": "#af3535" 576 | }, 577 | { 578 | "id": 99, 579 | "type": "LayerUtility: TextBox", 580 | "pos": [ 581 | -995.66650390625, 582 | -1975.4219970703125 583 | ], 584 | "size": [ 585 | 400, 586 | 200 587 | ], 588 | "flags": {}, 589 | "order": 5, 590 | "mode": 0, 591 | "inputs": [], 592 | "outputs": [ 593 | { 594 | "name": "text", 595 | "type": "STRING", 596 | "links": [ 597 | 191 598 | ], 599 | "slot_index": 0, 600 | "label": "text" 601 | } 602 | ], 603 | "properties": { 604 | "Node name for S&R": "LayerUtility: TextBox" 605 | }, 606 | "widgets_values": [ 607 | "((((a car))))", 608 | [ 609 | false, 610 | true 611 | ] 612 | ], 613 | "color": "rgba(38, 73, 116, 0.7)" 614 | }, 615 | { 616 | "id": 122, 617 | "type": "SaveImage", 618 | "pos": [ 619 | 593.1557006835938, 620 | -1934.9884033203125 621 | ], 622 | "size": [ 623 | 993.8319702148438, 624 | 1057.352783203125 625 | ], 626 | "flags": {}, 627 | "order": 24, 628 | "mode": 0, 629 | "inputs": [ 630 | { 631 | "name": "images", 632 | "type": "IMAGE", 633 | "link": 214, 634 | "label": "images" 635 | } 636 | ], 637 | "outputs": [], 638 | "properties": { 639 | "Node name for S&R": "SaveImage", 640 | "ttNbgOverride": { 641 | "color": "#af3535", 642 | "groupcolor": "#A88" 643 | } 644 | }, 645 | "widgets_values": [ 646 | "ComfyUI" 647 | ], 648 | "color": "#af3535" 649 | }, 650 | { 651 | "id": 110, 652 | "type": "StyleModelAdvancedApply", 653 | "pos": [ 654 | 414.768798828125, 655 | -2600.00146484375 656 | ], 657 | "size": [ 658 | 393, 659 | 242 660 | ], 661 | "flags": {}, 662 | "order": 20, 663 | "mode": 0, 664 | "inputs": [ 665 | { 666 | "name": "conditioning", 667 | "type": "CONDITIONING", 668 | "link": 197, 669 | "label": "conditioning" 670 | }, 671 | { 672 | "name": "style_model", 673 | "type": "STYLE_MODEL", 674 | "link": 198, 675 | "label": "style_model" 676 | }, 677 | { 678 | "name": "clip_vision_output", 679 | "type": "CLIP_VISION_OUTPUT", 680 | "link": 199, 681 | "label": "clip_vision_output" 682 | } 683 | ], 684 | "outputs": [ 685 | { 686 | "name": "CONDITIONING", 687 | "type": "CONDITIONING", 688 | "links": [ 689 | 203 690 | ], 691 | "slot_index": 0, 692 | "label": "CONDITIONING" 693 | } 694 | ], 695 | "properties": { 696 | "Node name for S&R": "StyleModelAdvancedApply", 697 | "ttNbgOverride": { 698 | "color": "#af3535", 699 | "groupcolor": "#A88" 700 | } 701 | }, 702 | "widgets_values": [ 703 | 0.3, 704 | 0.2, 705 | 0.5, 706 | 0.11000000000000001, 707 | 0.3, 708 | 0.3, 709 | 1 710 | ], 711 | "color": "#af3535" 712 | }, 713 | { 714 | "id": 118, 715 | "type": "KSampler", 716 | "pos": [ 717 | 1191.5052490234375, 718 | -2537.238525390625 719 | ], 720 | "size": [ 721 | 301.69000244140625, 722 | 474 723 | ], 724 | "flags": {}, 725 | "order": 22, 726 | "mode": 0, 727 | "inputs": [ 728 | { 729 | "name": "model", 730 | "type": "MODEL", 731 | "link": 412, 732 | "label": "model" 733 | }, 734 | { 735 | "name": "positive", 736 | "type": "CONDITIONING", 737 | "link": 209, 738 | "label": "positive" 739 | }, 740 | { 741 | "name": "negative", 742 | "type": "CONDITIONING", 743 | "link": 210, 744 | "label": "negative" 745 | }, 746 | { 747 | "name": "latent_image", 748 | "type": "LATENT", 749 | "link": 211, 750 | "label": "latent_image" 751 | } 752 | ], 753 | "outputs": [ 754 | { 755 | "name": "LATENT", 756 | "type": "LATENT", 757 | "links": [ 758 | 212 759 | ], 760 | "slot_index": 0, 761 | "label": "LATENT" 762 | } 763 | ], 764 | "properties": { 765 | "Node name for S&R": "KSampler", 766 | "ttNbgOverride": { 767 | "color": "#af3535", 768 | "groupcolor": "#A88" 769 | } 770 | }, 771 | "widgets_values": [ 772 | 353748859257925, 773 | "fixed", 774 | 20, 775 | 1, 776 | "euler", 777 | "sgm_uniform", 778 | 1 779 | ], 780 | "color": "#af3535" 781 | }, 782 | { 783 | "id": 114, 784 | "type": "ConditioningZeroOut", 785 | "pos": [ 786 | 419.0148010253906, 787 | -2270.22216796875 788 | ], 789 | "size": [ 790 | 317.4000244140625, 791 | 26 792 | ], 793 | "flags": {}, 794 | "order": 16, 795 | "mode": 0, 796 | "inputs": [ 797 | { 798 | "name": "conditioning", 799 | "type": "CONDITIONING", 800 | "link": 202, 801 | "label": "conditioning" 802 | } 803 | ], 804 | "outputs": [ 805 | { 806 | "name": "CONDITIONING", 807 | "type": "CONDITIONING", 808 | "links": [ 809 | 204 810 | ], 811 | "slot_index": 0, 812 | "label": "CONDITIONING" 813 | } 814 | ], 815 | "properties": { 816 | "Node name for S&R": "ConditioningZeroOut", 817 | "ttNbgOverride": { 818 | "color": "#af3535", 819 | "groupcolor": "#A88" 820 | } 821 | }, 822 | "widgets_values": [], 823 | "color": "#af3535" 824 | }, 825 | { 826 | "id": 102, 827 | "type": "CLIPVisionEncode", 828 | "pos": [ 829 | -57.20968246459961, 830 | -2314.82421875 831 | ], 832 | "size": [ 833 | 380.4000244140625, 834 | 78 835 | ], 836 | "flags": {}, 837 | "order": 13, 838 | "mode": 0, 839 | "inputs": [ 840 | { 841 | "name": "clip_vision", 842 | "type": "CLIP_VISION", 843 | "link": 188, 844 | "label": "clip_vision" 845 | }, 846 | { 847 | "name": "image", 848 | "type": "IMAGE", 849 | "link": 189, 850 | "label": "image" 851 | } 852 | ], 853 | "outputs": [ 854 | { 855 | "name": "CLIP_VISION_OUTPUT", 856 | "type": "CLIP_VISION_OUTPUT", 857 | "links": [ 858 | 199 859 | ], 860 | "slot_index": 0, 861 | "label": "CLIP_VISION_OUTPUT" 862 | } 863 | ], 864 | "properties": { 865 | "Node name for S&R": "CLIPVisionEncode", 866 | "ttNbgOverride": { 867 | "color": "#af3535", 868 | "groupcolor": "#A88" 869 | } 870 | }, 871 | "widgets_values": [ 872 | "none" 873 | ], 874 | "color": "#af3535" 875 | }, 876 | { 877 | "id": 108, 878 | "type": "FluxGuidance", 879 | "pos": [ 880 | -59.210662841796875, 881 | -2142.08740234375 882 | ], 883 | "size": [ 884 | 317.4000244140625, 885 | 58 886 | ], 887 | "flags": {}, 888 | "order": 15, 889 | "mode": 0, 890 | "inputs": [ 891 | { 892 | "name": "conditioning", 893 | "type": "CONDITIONING", 894 | "link": 193, 895 | "label": "conditioning" 896 | } 897 | ], 898 | "outputs": [ 899 | { 900 | "name": "CONDITIONING", 901 | "type": "CONDITIONING", 902 | "links": [ 903 | 194 904 | ], 905 | "slot_index": 0, 906 | "shape": 3, 907 | "label": "CONDITIONING" 908 | } 909 | ], 910 | "properties": { 911 | "Node name for S&R": "FluxGuidance", 912 | "ttNbgOverride": { 913 | "color": "#af3535", 914 | "groupcolor": "#A88" 915 | } 916 | }, 917 | "widgets_values": [ 918 | 30 919 | ], 920 | "color": "#af3535" 921 | }, 922 | { 923 | "id": 251, 924 | "type": "DepthAnythingPreprocessor", 925 | "pos": [ 926 | -606.832763671875, 927 | -1712.4217529296875 928 | ], 929 | "size": [ 930 | 315, 931 | 82 932 | ], 933 | "flags": {}, 934 | "order": 17, 935 | "mode": 0, 936 | "inputs": [ 937 | { 938 | "name": "image", 939 | "type": "IMAGE", 940 | "link": 413, 941 | "label": "image" 942 | } 943 | ], 944 | "outputs": [ 945 | { 946 | "name": "IMAGE", 947 | "type": "IMAGE", 948 | "links": [ 949 | 414, 950 | 415 951 | ], 952 | "label": "IMAGE", 953 | "slot_index": 0 954 | } 955 | ], 956 | "properties": { 957 | "Node name for S&R": "DepthAnythingPreprocessor" 958 | }, 959 | "widgets_values": [ 960 | "depth_anything_vitl14.pth", 961 | 1024 962 | ] 963 | }, 964 | { 965 | "id": 252, 966 | "type": "Note", 967 | "pos": [ 968 | -238.04998779296875, 969 | -1916.64990234375 970 | ], 971 | "size": [ 972 | 257.2620544433594, 973 | 58.883216857910156 974 | ], 975 | "flags": {}, 976 | "order": 6, 977 | "mode": 0, 978 | "inputs": [], 979 | "outputs": [], 980 | "properties": {}, 981 | "widgets_values": [ 982 | "Bear puppets or other subjects clearly defined\n熊布偶或者其他主体明确的" 983 | ], 984 | "color": "#432", 985 | "bgcolor": "#653" 986 | }, 987 | { 988 | "id": 120, 989 | "type": "LoadImage", 990 | "pos": [ 991 | 52.636688232421875, 992 | -1934.7999267578125 993 | ], 994 | "size": [ 995 | 519.1682739257812, 996 | 458.78656005859375 997 | ], 998 | "flags": {}, 999 | "order": 7, 1000 | "mode": 0, 1001 | "inputs": [], 1002 | "outputs": [ 1003 | { 1004 | "name": "IMAGE", 1005 | "type": "IMAGE", 1006 | "links": [ 1007 | 187 1008 | ], 1009 | "label": "IMAGE" 1010 | }, 1011 | { 1012 | "name": "MASK", 1013 | "type": "MASK", 1014 | "links": null, 1015 | "label": "MASK" 1016 | } 1017 | ], 1018 | "properties": { 1019 | "Node name for S&R": "LoadImage", 1020 | "ttNbgOverride": { 1021 | "color": "#af3535", 1022 | "groupcolor": "#A88" 1023 | } 1024 | }, 1025 | "widgets_values": [ 1026 | "棕色小熊布偶粉色衣服,白色背景.jpeg", 1027 | "image" 1028 | ], 1029 | "color": "#af3535" 1030 | }, 1031 | { 1032 | "id": 121, 1033 | "type": "LoadImage", 1034 | "pos": [ 1035 | 51.48653793334961, 1036 | -1299.1796875 1037 | ], 1038 | "size": [ 1039 | 520.03955078125, 1040 | 822.4721069335938 1041 | ], 1042 | "flags": {}, 1043 | "order": 8, 1044 | "mode": 0, 1045 | "inputs": [], 1046 | "outputs": [ 1047 | { 1048 | "name": "IMAGE", 1049 | "type": "IMAGE", 1050 | "links": [ 1051 | 189 1052 | ], 1053 | "slot_index": 0, 1054 | "label": "IMAGE" 1055 | }, 1056 | { 1057 | "name": "MASK", 1058 | "type": "MASK", 1059 | "links": null, 1060 | "label": "MASK" 1061 | } 1062 | ], 1063 | "properties": { 1064 | "Node name for S&R": "LoadImage", 1065 | "ttNbgOverride": { 1066 | "color": "#af3535", 1067 | "groupcolor": "#A88" 1068 | } 1069 | }, 1070 | "widgets_values": [ 1071 | "白色SUV汽车,(((纯白色背景))) (1).jpeg", 1072 | "image" 1073 | ], 1074 | "color": "#af3535" 1075 | }, 1076 | { 1077 | "id": 111, 1078 | "type": "LoadImage", 1079 | "pos": [ 1080 | -493.37646484375, 1081 | -1278.0262451171875 1082 | ], 1083 | "size": [ 1084 | 511.9278564453125, 1085 | 749.3704833984375 1086 | ], 1087 | "flags": {}, 1088 | "order": 9, 1089 | "mode": 0, 1090 | "inputs": [], 1091 | "outputs": [ 1092 | { 1093 | "name": "IMAGE", 1094 | "type": "IMAGE", 1095 | "links": [ 1096 | 200 1097 | ], 1098 | "slot_index": 0, 1099 | "shape": 3, 1100 | "label": "IMAGE" 1101 | }, 1102 | { 1103 | "name": "MASK", 1104 | "type": "MASK", 1105 | "links": null, 1106 | "shape": 3, 1107 | "label": "MASK" 1108 | } 1109 | ], 1110 | "properties": { 1111 | "Node name for S&R": "LoadImage", 1112 | "ttNbgOverride": { 1113 | "color": "#af3535", 1114 | "groupcolor": "#A88" 1115 | } 1116 | }, 1117 | "widgets_values": [ 1118 | "白色SUV汽车,(((纯白色背景))) (1).jpeg", 1119 | "image" 1120 | ], 1121 | "color": "#af3535" 1122 | }, 1123 | { 1124 | "id": 253, 1125 | "type": "Note", 1126 | "pos": [ 1127 | -149.91729736328125, 1128 | -1412.126708984375 1129 | ], 1130 | "size": [ 1131 | 319.1003723144531, 1132 | 77.34241485595703 1133 | ], 1134 | "flags": {}, 1135 | "order": 10, 1136 | "mode": 0, 1137 | "inputs": [], 1138 | "outputs": [], 1139 | "properties": {}, 1140 | "widgets_values": [ 1141 | "Cars or clearly defined objects\n汽车或者轮廓分明的主体\nTwo images can be the same or different\n两张图可以一样,也可以不一样" 1142 | ], 1143 | "color": "#432", 1144 | "bgcolor": "#653" 1145 | }, 1146 | { 1147 | "id": 124, 1148 | "type": "PreviewImage", 1149 | "pos": [ 1150 | -634.5548095703125, 1151 | -1576.6839599609375 1152 | ], 1153 | "size": [ 1154 | 210, 1155 | 246 1156 | ], 1157 | "flags": {}, 1158 | "order": 19, 1159 | "mode": 0, 1160 | "inputs": [ 1161 | { 1162 | "name": "images", 1163 | "type": "IMAGE", 1164 | "link": 415, 1165 | "label": "images" 1166 | } 1167 | ], 1168 | "outputs": [], 1169 | "properties": { 1170 | "Node name for S&R": "PreviewImage", 1171 | "ttNbgOverride": { 1172 | "color": "#af3535", 1173 | "groupcolor": "#A88" 1174 | } 1175 | }, 1176 | "widgets_values": [], 1177 | "color": "#af3535" 1178 | } 1179 | ], 1180 | "links": [ 1181 | [ 1182 | 92, 1183 | 48, 1184 | 0, 1185 | 47, 1186 | 0, 1187 | "IMAGE" 1188 | ], 1189 | [ 1190 | 102, 1191 | 47, 1192 | 0, 1193 | 53, 1194 | 0, 1195 | "IMAGE" 1196 | ], 1197 | [ 1198 | 114, 1199 | 4, 1200 | 0, 1201 | 3, 1202 | 0, 1203 | "MODEL" 1204 | ], 1205 | [ 1206 | 115, 1207 | 4, 1208 | 2, 1209 | 44, 1210 | 3, 1211 | "VAE" 1212 | ], 1213 | [ 1214 | 116, 1215 | 4, 1216 | 2, 1217 | 8, 1218 | 1, 1219 | "VAE" 1220 | ], 1221 | [ 1222 | 186, 1223 | 100, 1224 | 0, 1225 | 101, 1226 | 0, 1227 | "CLIP_VISION" 1228 | ], 1229 | [ 1230 | 187, 1231 | 120, 1232 | 0, 1233 | 101, 1234 | 1, 1235 | "IMAGE" 1236 | ], 1237 | [ 1238 | 188, 1239 | 100, 1240 | 0, 1241 | 102, 1242 | 0, 1243 | "CLIP_VISION" 1244 | ], 1245 | [ 1246 | 189, 1247 | 121, 1248 | 0, 1249 | 102, 1250 | 1, 1251 | "IMAGE" 1252 | ], 1253 | [ 1254 | 190, 1255 | 105, 1256 | 0, 1257 | 104, 1258 | 0, 1259 | "CLIP" 1260 | ], 1261 | [ 1262 | 191, 1263 | 99, 1264 | 0, 1265 | 104, 1266 | 1, 1267 | "STRING" 1268 | ], 1269 | [ 1270 | 193, 1271 | 104, 1272 | 0, 1273 | 108, 1274 | 0, 1275 | "CONDITIONING" 1276 | ], 1277 | [ 1278 | 194, 1279 | 108, 1280 | 0, 1281 | 109, 1282 | 0, 1283 | "CONDITIONING" 1284 | ], 1285 | [ 1286 | 195, 1287 | 107, 1288 | 0, 1289 | 109, 1290 | 1, 1291 | "STYLE_MODEL" 1292 | ], 1293 | [ 1294 | 196, 1295 | 101, 1296 | 0, 1297 | 109, 1298 | 2, 1299 | "CLIP_VISION_OUTPUT" 1300 | ], 1301 | [ 1302 | 197, 1303 | 109, 1304 | 0, 1305 | 110, 1306 | 0, 1307 | "CONDITIONING" 1308 | ], 1309 | [ 1310 | 198, 1311 | 107, 1312 | 0, 1313 | 110, 1314 | 1, 1315 | "STYLE_MODEL" 1316 | ], 1317 | [ 1318 | 199, 1319 | 102, 1320 | 0, 1321 | 110, 1322 | 2, 1323 | "CLIP_VISION_OUTPUT" 1324 | ], 1325 | [ 1326 | 200, 1327 | 111, 1328 | 0, 1329 | 112, 1330 | 0, 1331 | "IMAGE" 1332 | ], 1333 | [ 1334 | 202, 1335 | 104, 1336 | 0, 1337 | 114, 1338 | 0, 1339 | "CONDITIONING" 1340 | ], 1341 | [ 1342 | 203, 1343 | 110, 1344 | 0, 1345 | 115, 1346 | 0, 1347 | "CONDITIONING" 1348 | ], 1349 | [ 1350 | 204, 1351 | 114, 1352 | 0, 1353 | 115, 1354 | 1, 1355 | "CONDITIONING" 1356 | ], 1357 | [ 1358 | 205, 1359 | 116, 1360 | 0, 1361 | 115, 1362 | 2, 1363 | "VAE" 1364 | ], 1365 | [ 1366 | 209, 1367 | 115, 1368 | 0, 1369 | 118, 1370 | 1, 1371 | "CONDITIONING" 1372 | ], 1373 | [ 1374 | 210, 1375 | 115, 1376 | 1, 1377 | 118, 1378 | 2, 1379 | "CONDITIONING" 1380 | ], 1381 | [ 1382 | 211, 1383 | 115, 1384 | 2, 1385 | 118, 1386 | 3, 1387 | "LATENT" 1388 | ], 1389 | [ 1390 | 212, 1391 | 118, 1392 | 0, 1393 | 119, 1394 | 0, 1395 | "LATENT" 1396 | ], 1397 | [ 1398 | 213, 1399 | 116, 1400 | 0, 1401 | 119, 1402 | 1, 1403 | "VAE" 1404 | ], 1405 | [ 1406 | 214, 1407 | 119, 1408 | 0, 1409 | 122, 1410 | 0, 1411 | "IMAGE" 1412 | ], 1413 | [ 1414 | 412, 1415 | 103, 1416 | 0, 1417 | 118, 1418 | 0, 1419 | "MODEL" 1420 | ], 1421 | [ 1422 | 413, 1423 | 112, 1424 | 0, 1425 | 251, 1426 | 0, 1427 | "IMAGE" 1428 | ], 1429 | [ 1430 | 414, 1431 | 251, 1432 | 0, 1433 | 115, 1434 | 3, 1435 | "IMAGE" 1436 | ], 1437 | [ 1438 | 415, 1439 | 251, 1440 | 0, 1441 | 124, 1442 | 0, 1443 | "IMAGE" 1444 | ] 1445 | ], 1446 | "groups": [], 1447 | "config": {}, 1448 | "extra": { 1449 | "ds": { 1450 | "scale": 0.3797498335832526, 1451 | "offset": [ 1452 | 1318.4863195702646, 1453 | 2370.4801159625117 1454 | ] 1455 | }, 1456 | "ue_links": [] 1457 | }, 1458 | "version": 0.4 1459 | } -------------------------------------------------------------------------------- /example/flux redux 2image.json: -------------------------------------------------------------------------------- 1 | { 2 | "last_node_id": 60, 3 | "last_link_id": 167, 4 | "nodes": [ 5 | { 6 | "id": 8, 7 | "type": "VAEDecode", 8 | "pos": [ 9 | 721, 10 | 370 11 | ], 12 | "size": [ 13 | 210, 14 | 46 15 | ], 16 | "flags": {}, 17 | "order": 29, 18 | "mode": 0, 19 | "inputs": [ 20 | { 21 | "name": "samples", 22 | "type": "LATENT", 23 | "link": 24, 24 | "label": "samples" 25 | }, 26 | { 27 | "name": "vae", 28 | "type": "VAE", 29 | "link": 12, 30 | "label": "vae" 31 | } 32 | ], 33 | "outputs": [ 34 | { 35 | "name": "IMAGE", 36 | "type": "IMAGE", 37 | "links": [ 38 | 9 39 | ], 40 | "slot_index": 0, 41 | "label": "IMAGE" 42 | } 43 | ], 44 | "properties": { 45 | "Node name for S&R": "VAEDecode" 46 | }, 47 | "widgets_values": [] 48 | }, 49 | { 50 | "id": 10, 51 | "type": "VAELoader", 52 | "pos": [ 53 | 48, 54 | 429 55 | ], 56 | "size": [ 57 | 311.81634521484375, 58 | 60.429901123046875 59 | ], 60 | "flags": {}, 61 | "order": 0, 62 | "mode": 0, 63 | "inputs": [], 64 | "outputs": [ 65 | { 66 | "name": "VAE", 67 | "type": "VAE", 68 | "links": [ 69 | 12 70 | ], 71 | "slot_index": 0, 72 | "shape": 3, 73 | "label": "VAE" 74 | } 75 | ], 76 | "properties": { 77 | "Node name for S&R": "VAELoader" 78 | }, 79 | "widgets_values": [ 80 | "ae.sft" 81 | ] 82 | }, 83 | { 84 | "id": 11, 85 | "type": "DualCLIPLoader", 86 | "pos": [ 87 | 49, 88 | 275 89 | ], 90 | "size": [ 91 | 315, 92 | 106 93 | ], 94 | "flags": {}, 95 | "order": 1, 96 | "mode": 0, 97 | "inputs": [], 98 | "outputs": [ 99 | { 100 | "name": "CLIP", 101 | "type": "CLIP", 102 | "links": [ 103 | 10 104 | ], 105 | "slot_index": 0, 106 | "shape": 3, 107 | "label": "CLIP" 108 | } 109 | ], 110 | "properties": { 111 | "Node name for S&R": "DualCLIPLoader" 112 | }, 113 | "widgets_values": [ 114 | "t5xxl_fp16.safetensors", 115 | "clip_l.safetensors", 116 | "flux" 117 | ] 118 | }, 119 | { 120 | "id": 12, 121 | "type": "UNETLoader", 122 | "pos": [ 123 | 48, 124 | 144 125 | ], 126 | "size": [ 127 | 315, 128 | 82 129 | ], 130 | "flags": {}, 131 | "order": 2, 132 | "mode": 0, 133 | "inputs": [], 134 | "outputs": [ 135 | { 136 | "name": "MODEL", 137 | "type": "MODEL", 138 | "links": [ 139 | 56 140 | ], 141 | "slot_index": 0, 142 | "shape": 3, 143 | "label": "MODEL" 144 | } 145 | ], 146 | "properties": { 147 | "Node name for S&R": "UNETLoader" 148 | }, 149 | "widgets_values": [ 150 | "flux1-dev-fp8-e4m3fn.safetensors", 151 | "fp8_e4m3fn" 152 | ], 153 | "color": "#223", 154 | "bgcolor": "#335" 155 | }, 156 | { 157 | "id": 13, 158 | "type": "SamplerCustomAdvanced", 159 | "pos": [ 160 | 443, 161 | 300 162 | ], 163 | "size": [ 164 | 272.3617858886719, 165 | 124.53733825683594 166 | ], 167 | "flags": {}, 168 | "order": 28, 169 | "mode": 0, 170 | "inputs": [ 171 | { 172 | "name": "noise", 173 | "type": "NOISE", 174 | "link": 37, 175 | "slot_index": 0, 176 | "label": "noise" 177 | }, 178 | { 179 | "name": "guider", 180 | "type": "GUIDER", 181 | "link": 30, 182 | "slot_index": 1, 183 | "label": "guider" 184 | }, 185 | { 186 | "name": "sampler", 187 | "type": "SAMPLER", 188 | "link": 19, 189 | "slot_index": 2, 190 | "label": "sampler" 191 | }, 192 | { 193 | "name": "sigmas", 194 | "type": "SIGMAS", 195 | "link": 20, 196 | "slot_index": 3, 197 | "label": "sigmas" 198 | }, 199 | { 200 | "name": "latent_image", 201 | "type": "LATENT", 202 | "link": 116, 203 | "slot_index": 4, 204 | "label": "latent_image" 205 | } 206 | ], 207 | "outputs": [ 208 | { 209 | "name": "output", 210 | "type": "LATENT", 211 | "links": [ 212 | 24 213 | ], 214 | "slot_index": 0, 215 | "shape": 3, 216 | "label": "output" 217 | }, 218 | { 219 | "name": "denoised_output", 220 | "type": "LATENT", 221 | "links": null, 222 | "shape": 3, 223 | "label": "denoised_output" 224 | } 225 | ], 226 | "properties": { 227 | "Node name for S&R": "SamplerCustomAdvanced" 228 | }, 229 | "widgets_values": [] 230 | }, 231 | { 232 | "id": 16, 233 | "type": "KSamplerSelect", 234 | "pos": [ 235 | 480, 236 | 912 237 | ], 238 | "size": [ 239 | 315, 240 | 58 241 | ], 242 | "flags": {}, 243 | "order": 3, 244 | "mode": 0, 245 | "inputs": [], 246 | "outputs": [ 247 | { 248 | "name": "SAMPLER", 249 | "type": "SAMPLER", 250 | "links": [ 251 | 19 252 | ], 253 | "shape": 3, 254 | "label": "SAMPLER" 255 | } 256 | ], 257 | "properties": { 258 | "Node name for S&R": "KSamplerSelect" 259 | }, 260 | "widgets_values": [ 261 | "euler" 262 | ] 263 | }, 264 | { 265 | "id": 17, 266 | "type": "BasicScheduler", 267 | "pos": [ 268 | 480, 269 | 1008 270 | ], 271 | "size": [ 272 | 315, 273 | 106 274 | ], 275 | "flags": {}, 276 | "order": 17, 277 | "mode": 0, 278 | "inputs": [ 279 | { 280 | "name": "model", 281 | "type": "MODEL", 282 | "link": 55, 283 | "slot_index": 0, 284 | "label": "model" 285 | } 286 | ], 287 | "outputs": [ 288 | { 289 | "name": "SIGMAS", 290 | "type": "SIGMAS", 291 | "links": [ 292 | 20 293 | ], 294 | "shape": 3, 295 | "label": "SIGMAS" 296 | } 297 | ], 298 | "properties": { 299 | "Node name for S&R": "BasicScheduler" 300 | }, 301 | "widgets_values": [ 302 | "ddim_uniform", 303 | 20, 304 | 1 305 | ] 306 | }, 307 | { 308 | "id": 25, 309 | "type": "RandomNoise", 310 | "pos": [ 311 | 480, 312 | 768 313 | ], 314 | "size": [ 315 | 315, 316 | 82 317 | ], 318 | "flags": {}, 319 | "order": 4, 320 | "mode": 0, 321 | "inputs": [], 322 | "outputs": [ 323 | { 324 | "name": "NOISE", 325 | "type": "NOISE", 326 | "links": [ 327 | 37 328 | ], 329 | "shape": 3, 330 | "label": "NOISE" 331 | } 332 | ], 333 | "properties": { 334 | "Node name for S&R": "RandomNoise" 335 | }, 336 | "widgets_values": [ 337 | 207115466652835, 338 | "randomize" 339 | ], 340 | "color": "#2a363b", 341 | "bgcolor": "#3f5159" 342 | }, 343 | { 344 | "id": 26, 345 | "type": "FluxGuidance", 346 | "pos": [ 347 | 445, 348 | 174 349 | ], 350 | "size": [ 351 | 317.4000244140625, 352 | 58 353 | ], 354 | "flags": {}, 355 | "order": 16, 356 | "mode": 0, 357 | "inputs": [ 358 | { 359 | "name": "conditioning", 360 | "type": "CONDITIONING", 361 | "link": 41, 362 | "label": "conditioning" 363 | } 364 | ], 365 | "outputs": [ 366 | { 367 | "name": "CONDITIONING", 368 | "type": "CONDITIONING", 369 | "links": [ 370 | 122, 371 | 132 372 | ], 373 | "slot_index": 0, 374 | "shape": 3, 375 | "label": "CONDITIONING" 376 | } 377 | ], 378 | "properties": { 379 | "Node name for S&R": "FluxGuidance" 380 | }, 381 | "widgets_values": [ 382 | 30 383 | ], 384 | "color": "#233", 385 | "bgcolor": "#355" 386 | }, 387 | { 388 | "id": 27, 389 | "type": "EmptySD3LatentImage", 390 | "pos": [ 391 | 480, 392 | 624 393 | ], 394 | "size": [ 395 | 315, 396 | 106 397 | ], 398 | "flags": {}, 399 | "order": 12, 400 | "mode": 0, 401 | "inputs": [ 402 | { 403 | "name": "width", 404 | "type": "INT", 405 | "link": 112, 406 | "widget": { 407 | "name": "width" 408 | }, 409 | "label": "width" 410 | }, 411 | { 412 | "name": "height", 413 | "type": "INT", 414 | "link": 113, 415 | "widget": { 416 | "name": "height" 417 | }, 418 | "label": "height" 419 | } 420 | ], 421 | "outputs": [ 422 | { 423 | "name": "LATENT", 424 | "type": "LATENT", 425 | "links": [ 426 | 116 427 | ], 428 | "slot_index": 0, 429 | "shape": 3, 430 | "label": "LATENT" 431 | } 432 | ], 433 | "properties": { 434 | "Node name for S&R": "EmptySD3LatentImage" 435 | }, 436 | "widgets_values": [ 437 | 896, 438 | 1104, 439 | 1 440 | ] 441 | }, 442 | { 443 | "id": 30, 444 | "type": "ModelSamplingFlux", 445 | "pos": [ 446 | 480, 447 | 1152 448 | ], 449 | "size": [ 450 | 315, 451 | 130 452 | ], 453 | "flags": {}, 454 | "order": 13, 455 | "mode": 0, 456 | "inputs": [ 457 | { 458 | "name": "model", 459 | "type": "MODEL", 460 | "link": 56, 461 | "slot_index": 0, 462 | "label": "model" 463 | }, 464 | { 465 | "name": "width", 466 | "type": "INT", 467 | "link": 115, 468 | "slot_index": 1, 469 | "widget": { 470 | "name": "width" 471 | }, 472 | "label": "width" 473 | }, 474 | { 475 | "name": "height", 476 | "type": "INT", 477 | "link": 114, 478 | "slot_index": 2, 479 | "widget": { 480 | "name": "height" 481 | }, 482 | "label": "height" 483 | } 484 | ], 485 | "outputs": [ 486 | { 487 | "name": "MODEL", 488 | "type": "MODEL", 489 | "links": [ 490 | 54, 491 | 55 492 | ], 493 | "slot_index": 0, 494 | "shape": 3, 495 | "label": "MODEL" 496 | } 497 | ], 498 | "properties": { 499 | "Node name for S&R": "ModelSamplingFlux" 500 | }, 501 | "widgets_values": [ 502 | 1.15, 503 | 0.5, 504 | 896, 505 | 1104 506 | ] 507 | }, 508 | { 509 | "id": 34, 510 | "type": "PrimitiveNode", 511 | "pos": [ 512 | 432, 513 | 480 514 | ], 515 | "size": [ 516 | 210, 517 | 82 518 | ], 519 | "flags": {}, 520 | "order": 5, 521 | "mode": 0, 522 | "inputs": [], 523 | "outputs": [ 524 | { 525 | "name": "INT", 526 | "type": "INT", 527 | "links": [ 528 | 112, 529 | 115 530 | ], 531 | "slot_index": 0, 532 | "widget": { 533 | "name": "width" 534 | }, 535 | "label": "INT" 536 | } 537 | ], 538 | "title": "width", 539 | "properties": { 540 | "Run widget replace on values": false 541 | }, 542 | "widgets_values": [ 543 | 896, 544 | "fixed" 545 | ], 546 | "color": "#323", 547 | "bgcolor": "#535" 548 | }, 549 | { 550 | "id": 35, 551 | "type": "PrimitiveNode", 552 | "pos": [ 553 | 672, 554 | 480 555 | ], 556 | "size": [ 557 | 210, 558 | 82 559 | ], 560 | "flags": {}, 561 | "order": 6, 562 | "mode": 0, 563 | "inputs": [], 564 | "outputs": [ 565 | { 566 | "name": "INT", 567 | "type": "INT", 568 | "links": [ 569 | 113, 570 | 114 571 | ], 572 | "slot_index": 0, 573 | "widget": { 574 | "name": "height" 575 | }, 576 | "label": "INT" 577 | } 578 | ], 579 | "title": "height", 580 | "properties": { 581 | "Run widget replace on values": false 582 | }, 583 | "widgets_values": [ 584 | 1104, 585 | "fixed" 586 | ], 587 | "color": "#323", 588 | "bgcolor": "#535" 589 | }, 590 | { 591 | "id": 6, 592 | "type": "CLIPTextEncode", 593 | "pos": [ 594 | 440, 595 | 111 596 | ], 597 | "size": [ 598 | 422.84503173828125, 599 | 164.31304931640625 600 | ], 601 | "flags": { 602 | "collapsed": true 603 | }, 604 | "order": 11, 605 | "mode": 0, 606 | "inputs": [ 607 | { 608 | "name": "clip", 609 | "type": "CLIP", 610 | "link": 10, 611 | "label": "clip" 612 | } 613 | ], 614 | "outputs": [ 615 | { 616 | "name": "CONDITIONING", 617 | "type": "CONDITIONING", 618 | "links": [ 619 | 41 620 | ], 621 | "slot_index": 0, 622 | "label": "CONDITIONING" 623 | } 624 | ], 625 | "title": "CLIP Text Encode (Positive Prompt)", 626 | "properties": { 627 | "Node name for S&R": "CLIPTextEncode" 628 | }, 629 | "widgets_values": [ 630 | "", 631 | true 632 | ], 633 | "color": "#232", 634 | "bgcolor": "#353" 635 | }, 636 | { 637 | "id": 42, 638 | "type": "StyleModelLoader", 639 | "pos": [ 640 | -6, 641 | -16 642 | ], 643 | "size": [ 644 | 340, 645 | 60 646 | ], 647 | "flags": {}, 648 | "order": 7, 649 | "mode": 0, 650 | "inputs": [], 651 | "outputs": [ 652 | { 653 | "name": "STYLE_MODEL", 654 | "type": "STYLE_MODEL", 655 | "links": [ 656 | 119, 657 | 130, 658 | 139, 659 | 151 660 | ], 661 | "slot_index": 0, 662 | "label": "STYLE_MODEL" 663 | } 664 | ], 665 | "properties": { 666 | "Node name for S&R": "StyleModelLoader" 667 | }, 668 | "widgets_values": [ 669 | "flux1-redux-dev.safetensors" 670 | ] 671 | }, 672 | { 673 | "id": 38, 674 | "type": "CLIPVisionLoader", 675 | "pos": [ 676 | -9, 677 | -123 678 | ], 679 | "size": [ 680 | 370, 681 | 60 682 | ], 683 | "flags": {}, 684 | "order": 8, 685 | "mode": 0, 686 | "inputs": [], 687 | "outputs": [ 688 | { 689 | "name": "CLIP_VISION", 690 | "type": "CLIP_VISION", 691 | "links": [ 692 | 117, 693 | 127 694 | ], 695 | "slot_index": 0, 696 | "label": "CLIP_VISION" 697 | } 698 | ], 699 | "properties": { 700 | "Node name for S&R": "CLIPVisionLoader" 701 | }, 702 | "widgets_values": [ 703 | "sigclip_vision_patch14_384.safetensors" 704 | ] 705 | }, 706 | { 707 | "id": 58, 708 | "type": "Reroute", 709 | "pos": [ 710 | 2195, 711 | -356 712 | ], 713 | "size": [ 714 | 75, 715 | 26 716 | ], 717 | "flags": {}, 718 | "order": 26, 719 | "mode": 0, 720 | "inputs": [ 721 | { 722 | "name": "", 723 | "type": "*", 724 | "link": 165, 725 | "label": "" 726 | } 727 | ], 728 | "outputs": [ 729 | { 730 | "name": "", 731 | "type": "CONDITIONING", 732 | "links": [ 733 | 158 734 | ], 735 | "label": "" 736 | } 737 | ], 738 | "properties": { 739 | "showOutputText": false, 740 | "horizontal": false 741 | } 742 | }, 743 | { 744 | "id": 22, 745 | "type": "BasicGuider", 746 | "pos": [ 747 | 2339, 748 | -329 749 | ], 750 | "size": [ 751 | 222.3482666015625, 752 | 46 753 | ], 754 | "flags": {}, 755 | "order": 27, 756 | "mode": 0, 757 | "inputs": [ 758 | { 759 | "name": "model", 760 | "type": "MODEL", 761 | "link": 54, 762 | "slot_index": 0, 763 | "label": "model" 764 | }, 765 | { 766 | "name": "conditioning", 767 | "type": "CONDITIONING", 768 | "link": 158, 769 | "slot_index": 1, 770 | "label": "conditioning" 771 | } 772 | ], 773 | "outputs": [ 774 | { 775 | "name": "GUIDER", 776 | "type": "GUIDER", 777 | "links": [ 778 | 30 779 | ], 780 | "slot_index": 0, 781 | "shape": 3, 782 | "label": "GUIDER" 783 | } 784 | ], 785 | "properties": { 786 | "Node name for S&R": "BasicGuider" 787 | }, 788 | "widgets_values": [] 789 | }, 790 | { 791 | "id": 39, 792 | "type": "CLIPVisionEncode", 793 | "pos": [ 794 | 439, 795 | -14 796 | ], 797 | "size": [ 798 | 290, 799 | 50 800 | ], 801 | "flags": {}, 802 | "order": 19, 803 | "mode": 0, 804 | "inputs": [ 805 | { 806 | "name": "clip_vision", 807 | "type": "CLIP_VISION", 808 | "link": 117, 809 | "label": "clip_vision" 810 | }, 811 | { 812 | "name": "image", 813 | "type": "IMAGE", 814 | "link": 143, 815 | "label": "image" 816 | } 817 | ], 818 | "outputs": [ 819 | { 820 | "name": "CLIP_VISION_OUTPUT", 821 | "type": "CLIP_VISION_OUTPUT", 822 | "links": [ 823 | 120, 824 | 131 825 | ], 826 | "slot_index": 0, 827 | "label": "CLIP_VISION_OUTPUT" 828 | } 829 | ], 830 | "properties": { 831 | "Node name for S&R": "CLIPVisionEncode" 832 | }, 833 | "widgets_values": [] 834 | }, 835 | { 836 | "id": 46, 837 | "type": "CLIPVisionEncode", 838 | "pos": [ 839 | 478, 840 | -125 841 | ], 842 | "size": [ 843 | 290, 844 | 50 845 | ], 846 | "flags": {}, 847 | "order": 18, 848 | "mode": 0, 849 | "inputs": [ 850 | { 851 | "name": "clip_vision", 852 | "type": "CLIP_VISION", 853 | "link": 127, 854 | "label": "clip_vision" 855 | }, 856 | { 857 | "name": "image", 858 | "type": "IMAGE", 859 | "link": 167, 860 | "label": "image" 861 | } 862 | ], 863 | "outputs": [ 864 | { 865 | "name": "CLIP_VISION_OUTPUT", 866 | "type": "CLIP_VISION_OUTPUT", 867 | "links": [ 868 | 138, 869 | 150 870 | ], 871 | "slot_index": 0, 872 | "label": "CLIP_VISION_OUTPUT" 873 | } 874 | ], 875 | "properties": { 876 | "Node name for S&R": "CLIPVisionEncode" 877 | }, 878 | "widgets_values": [] 879 | }, 880 | { 881 | "id": 41, 882 | "type": "StyleModelApply", 883 | "pos": [ 884 | 1189.19482421875, 885 | -476.9764099121094 886 | ], 887 | "size": [ 888 | 320, 889 | 70 890 | ], 891 | "flags": {}, 892 | "order": 20, 893 | "mode": 0, 894 | "inputs": [ 895 | { 896 | "name": "conditioning", 897 | "type": "CONDITIONING", 898 | "link": 122, 899 | "label": "conditioning" 900 | }, 901 | { 902 | "name": "style_model", 903 | "type": "STYLE_MODEL", 904 | "link": 119, 905 | "label": "style_model" 906 | }, 907 | { 908 | "name": "clip_vision_output", 909 | "type": "CLIP_VISION_OUTPUT", 910 | "link": 120, 911 | "shape": 7, 912 | "label": "clip_vision_output" 913 | } 914 | ], 915 | "outputs": [ 916 | { 917 | "name": "CONDITIONING", 918 | "type": "CONDITIONING", 919 | "links": [ 920 | 149 921 | ], 922 | "slot_index": 0, 923 | "label": "CONDITIONING" 924 | } 925 | ], 926 | "properties": { 927 | "Node name for S&R": "StyleModelApply" 928 | }, 929 | "widgets_values": [] 930 | }, 931 | { 932 | "id": 55, 933 | "type": "StyleModelApply", 934 | "pos": [ 935 | 1661.1949462890625, 936 | -472.9764099121094 937 | ], 938 | "size": [ 939 | 320, 940 | 70 941 | ], 942 | "flags": {}, 943 | "order": 22, 944 | "mode": 0, 945 | "inputs": [ 946 | { 947 | "name": "conditioning", 948 | "type": "CONDITIONING", 949 | "link": 149, 950 | "label": "conditioning" 951 | }, 952 | { 953 | "name": "style_model", 954 | "type": "STYLE_MODEL", 955 | "link": 151, 956 | "label": "style_model" 957 | }, 958 | { 959 | "name": "clip_vision_output", 960 | "type": "CLIP_VISION_OUTPUT", 961 | "link": 150, 962 | "shape": 7, 963 | "label": "clip_vision_output" 964 | } 965 | ], 966 | "outputs": [ 967 | { 968 | "name": "CONDITIONING", 969 | "type": "CONDITIONING", 970 | "links": [ 971 | 156 972 | ], 973 | "slot_index": 0, 974 | "label": "CONDITIONING" 975 | } 976 | ], 977 | "properties": { 978 | "Node name for S&R": "StyleModelApply" 979 | }, 980 | "widgets_values": [] 981 | }, 982 | { 983 | "id": 48, 984 | "type": "StyleModelAdvancedApply", 985 | "pos": [ 986 | 1185.7415771484375, 987 | -222.37071228027344 988 | ], 989 | "size": [ 990 | 393, 991 | 194 992 | ], 993 | "flags": {}, 994 | "order": 21, 995 | "mode": 0, 996 | "inputs": [ 997 | { 998 | "name": "conditioning", 999 | "type": "CONDITIONING", 1000 | "link": 132, 1001 | "label": "conditioning" 1002 | }, 1003 | { 1004 | "name": "style_model", 1005 | "type": "STYLE_MODEL", 1006 | "link": 130, 1007 | "label": "style_model" 1008 | }, 1009 | { 1010 | "name": "clip_vision_output", 1011 | "type": "CLIP_VISION_OUTPUT", 1012 | "link": 131, 1013 | "label": "clip_vision_output" 1014 | } 1015 | ], 1016 | "outputs": [ 1017 | { 1018 | "name": "CONDITIONING", 1019 | "type": "CONDITIONING", 1020 | "links": [ 1021 | 140 1022 | ], 1023 | "slot_index": 0, 1024 | "label": "CONDITIONING" 1025 | } 1026 | ], 1027 | "properties": { 1028 | "Node name for S&R": "StyleModelAdvancedApply" 1029 | }, 1030 | "widgets_values": [ 1031 | 0.1, 1032 | 1, 1033 | 0.8, 1034 | 0.1, 1035 | 1 1036 | ] 1037 | }, 1038 | { 1039 | "id": 9, 1040 | "type": "SaveImage", 1041 | "pos": [ 1042 | 1843, 1043 | 616 1044 | ], 1045 | "size": [ 1046 | 936.0477294921875, 1047 | 1022.9822387695312 1048 | ], 1049 | "flags": {}, 1050 | "order": 30, 1051 | "mode": 0, 1052 | "inputs": [ 1053 | { 1054 | "name": "images", 1055 | "type": "IMAGE", 1056 | "link": 9, 1057 | "label": "images" 1058 | } 1059 | ], 1060 | "outputs": [], 1061 | "properties": { 1062 | "Node name for S&R": "SaveImage" 1063 | }, 1064 | "widgets_values": [ 1065 | "ComfyUI" 1066 | ] 1067 | }, 1068 | { 1069 | "id": 56, 1070 | "type": "Reroute", 1071 | "pos": [ 1072 | 2069, 1073 | -417 1074 | ], 1075 | "size": [ 1076 | 75, 1077 | 26 1078 | ], 1079 | "flags": {}, 1080 | "order": 24, 1081 | "mode": 0, 1082 | "inputs": [ 1083 | { 1084 | "name": "", 1085 | "type": "*", 1086 | "link": 156, 1087 | "label": "" 1088 | } 1089 | ], 1090 | "outputs": [ 1091 | { 1092 | "name": "", 1093 | "type": "CONDITIONING", 1094 | "links": [], 1095 | "slot_index": 0, 1096 | "label": "" 1097 | } 1098 | ], 1099 | "properties": { 1100 | "showOutputText": false, 1101 | "horizontal": false 1102 | } 1103 | }, 1104 | { 1105 | "id": 57, 1106 | "type": "Reroute", 1107 | "pos": [ 1108 | 2084, 1109 | -326 1110 | ], 1111 | "size": [ 1112 | 75, 1113 | 26 1114 | ], 1115 | "flags": {}, 1116 | "order": 25, 1117 | "mode": 0, 1118 | "inputs": [ 1119 | { 1120 | "name": "", 1121 | "type": "*", 1122 | "link": 157, 1123 | "label": "" 1124 | } 1125 | ], 1126 | "outputs": [ 1127 | { 1128 | "name": "", 1129 | "type": "CONDITIONING", 1130 | "links": [ 1131 | 165 1132 | ], 1133 | "slot_index": 0, 1134 | "label": "" 1135 | } 1136 | ], 1137 | "properties": { 1138 | "showOutputText": false, 1139 | "horizontal": false 1140 | } 1141 | }, 1142 | { 1143 | "id": 59, 1144 | "type": "ImageScaleBy", 1145 | "pos": [ 1146 | 1444, 1147 | 198 1148 | ], 1149 | "size": [ 1150 | 315, 1151 | 82 1152 | ], 1153 | "flags": {}, 1154 | "order": 14, 1155 | "mode": 0, 1156 | "inputs": [ 1157 | { 1158 | "name": "image", 1159 | "type": "IMAGE", 1160 | "link": 166, 1161 | "label": "image" 1162 | } 1163 | ], 1164 | "outputs": [ 1165 | { 1166 | "name": "IMAGE", 1167 | "type": "IMAGE", 1168 | "links": [ 1169 | 167 1170 | ], 1171 | "slot_index": 0, 1172 | "label": "IMAGE" 1173 | } 1174 | ], 1175 | "properties": { 1176 | "Node name for S&R": "ImageScaleBy" 1177 | }, 1178 | "widgets_values": [ 1179 | "nearest-exact", 1180 | 1 1181 | ] 1182 | }, 1183 | { 1184 | "id": 52, 1185 | "type": "ImageScaleBy", 1186 | "pos": [ 1187 | 952, 1188 | 198 1189 | ], 1190 | "size": [ 1191 | 315, 1192 | 82 1193 | ], 1194 | "flags": {}, 1195 | "order": 15, 1196 | "mode": 0, 1197 | "inputs": [ 1198 | { 1199 | "name": "image", 1200 | "type": "IMAGE", 1201 | "link": 142, 1202 | "label": "image" 1203 | } 1204 | ], 1205 | "outputs": [ 1206 | { 1207 | "name": "IMAGE", 1208 | "type": "IMAGE", 1209 | "links": [ 1210 | 143 1211 | ], 1212 | "slot_index": 0, 1213 | "label": "IMAGE" 1214 | } 1215 | ], 1216 | "properties": { 1217 | "Node name for S&R": "ImageScaleBy" 1218 | }, 1219 | "widgets_values": [ 1220 | "nearest-exact", 1221 | 1 1222 | ] 1223 | }, 1224 | { 1225 | "id": 47, 1226 | "type": "LoadImage", 1227 | "pos": [ 1228 | 2857, 1229 | 615 1230 | ], 1231 | "size": [ 1232 | 762.0504760742188, 1233 | 1016.7177734375 1234 | ], 1235 | "flags": {}, 1236 | "order": 9, 1237 | "mode": 0, 1238 | "inputs": [], 1239 | "outputs": [ 1240 | { 1241 | "name": "IMAGE", 1242 | "type": "IMAGE", 1243 | "links": [ 1244 | 166 1245 | ], 1246 | "slot_index": 0, 1247 | "label": "IMAGE" 1248 | }, 1249 | { 1250 | "name": "MASK", 1251 | "type": "MASK", 1252 | "links": null, 1253 | "slot_index": 1, 1254 | "label": "MASK" 1255 | } 1256 | ], 1257 | "properties": { 1258 | "Node name for S&R": "LoadImage" 1259 | }, 1260 | "widgets_values": [ 1261 | "5a78.png", 1262 | "image" 1263 | ] 1264 | }, 1265 | { 1266 | "id": 40, 1267 | "type": "LoadImage", 1268 | "pos": [ 1269 | 1038, 1270 | 614 1271 | ], 1272 | "size": [ 1273 | 702.7955322265625, 1274 | 936.547607421875 1275 | ], 1276 | "flags": {}, 1277 | "order": 10, 1278 | "mode": 0, 1279 | "inputs": [], 1280 | "outputs": [ 1281 | { 1282 | "name": "IMAGE", 1283 | "type": "IMAGE", 1284 | "links": [ 1285 | 142 1286 | ], 1287 | "slot_index": 0, 1288 | "label": "IMAGE" 1289 | }, 1290 | { 1291 | "name": "MASK", 1292 | "type": "MASK", 1293 | "links": null, 1294 | "label": "MASK" 1295 | } 1296 | ], 1297 | "properties": { 1298 | "Node name for S&R": "LoadImage" 1299 | }, 1300 | "widgets_values": [ 1301 | "55 (1).png", 1302 | "image" 1303 | ] 1304 | }, 1305 | { 1306 | "id": 51, 1307 | "type": "StyleModelAdvancedApply", 1308 | "pos": [ 1309 | 1585, 1310 | -234 1311 | ], 1312 | "size": [ 1313 | 393, 1314 | 194 1315 | ], 1316 | "flags": {}, 1317 | "order": 23, 1318 | "mode": 0, 1319 | "inputs": [ 1320 | { 1321 | "name": "conditioning", 1322 | "type": "CONDITIONING", 1323 | "link": 140, 1324 | "label": "conditioning" 1325 | }, 1326 | { 1327 | "name": "style_model", 1328 | "type": "STYLE_MODEL", 1329 | "link": 139, 1330 | "label": "style_model" 1331 | }, 1332 | { 1333 | "name": "clip_vision_output", 1334 | "type": "CLIP_VISION_OUTPUT", 1335 | "link": 138, 1336 | "label": "clip_vision_output" 1337 | } 1338 | ], 1339 | "outputs": [ 1340 | { 1341 | "name": "CONDITIONING", 1342 | "type": "CONDITIONING", 1343 | "links": [ 1344 | 157 1345 | ], 1346 | "slot_index": 0, 1347 | "label": "CONDITIONING" 1348 | } 1349 | ], 1350 | "properties": { 1351 | "Node name for S&R": "StyleModelAdvancedApply" 1352 | }, 1353 | "widgets_values": [ 1354 | 1, 1355 | 1, 1356 | 1, 1357 | 1, 1358 | 1 1359 | ] 1360 | } 1361 | ], 1362 | "links": [ 1363 | [ 1364 | 9, 1365 | 8, 1366 | 0, 1367 | 9, 1368 | 0, 1369 | "IMAGE" 1370 | ], 1371 | [ 1372 | 10, 1373 | 11, 1374 | 0, 1375 | 6, 1376 | 0, 1377 | "CLIP" 1378 | ], 1379 | [ 1380 | 12, 1381 | 10, 1382 | 0, 1383 | 8, 1384 | 1, 1385 | "VAE" 1386 | ], 1387 | [ 1388 | 19, 1389 | 16, 1390 | 0, 1391 | 13, 1392 | 2, 1393 | "SAMPLER" 1394 | ], 1395 | [ 1396 | 20, 1397 | 17, 1398 | 0, 1399 | 13, 1400 | 3, 1401 | "SIGMAS" 1402 | ], 1403 | [ 1404 | 24, 1405 | 13, 1406 | 0, 1407 | 8, 1408 | 0, 1409 | "LATENT" 1410 | ], 1411 | [ 1412 | 30, 1413 | 22, 1414 | 0, 1415 | 13, 1416 | 1, 1417 | "GUIDER" 1418 | ], 1419 | [ 1420 | 37, 1421 | 25, 1422 | 0, 1423 | 13, 1424 | 0, 1425 | "NOISE" 1426 | ], 1427 | [ 1428 | 41, 1429 | 6, 1430 | 0, 1431 | 26, 1432 | 0, 1433 | "CONDITIONING" 1434 | ], 1435 | [ 1436 | 54, 1437 | 30, 1438 | 0, 1439 | 22, 1440 | 0, 1441 | "MODEL" 1442 | ], 1443 | [ 1444 | 55, 1445 | 30, 1446 | 0, 1447 | 17, 1448 | 0, 1449 | "MODEL" 1450 | ], 1451 | [ 1452 | 56, 1453 | 12, 1454 | 0, 1455 | 30, 1456 | 0, 1457 | "MODEL" 1458 | ], 1459 | [ 1460 | 112, 1461 | 34, 1462 | 0, 1463 | 27, 1464 | 0, 1465 | "INT" 1466 | ], 1467 | [ 1468 | 113, 1469 | 35, 1470 | 0, 1471 | 27, 1472 | 1, 1473 | "INT" 1474 | ], 1475 | [ 1476 | 114, 1477 | 35, 1478 | 0, 1479 | 30, 1480 | 2, 1481 | "INT" 1482 | ], 1483 | [ 1484 | 115, 1485 | 34, 1486 | 0, 1487 | 30, 1488 | 1, 1489 | "INT" 1490 | ], 1491 | [ 1492 | 116, 1493 | 27, 1494 | 0, 1495 | 13, 1496 | 4, 1497 | "LATENT" 1498 | ], 1499 | [ 1500 | 117, 1501 | 38, 1502 | 0, 1503 | 39, 1504 | 0, 1505 | "CLIP_VISION" 1506 | ], 1507 | [ 1508 | 119, 1509 | 42, 1510 | 0, 1511 | 41, 1512 | 1, 1513 | "STYLE_MODEL" 1514 | ], 1515 | [ 1516 | 120, 1517 | 39, 1518 | 0, 1519 | 41, 1520 | 2, 1521 | "CLIP_VISION_OUTPUT" 1522 | ], 1523 | [ 1524 | 122, 1525 | 26, 1526 | 0, 1527 | 41, 1528 | 0, 1529 | "CONDITIONING" 1530 | ], 1531 | [ 1532 | 127, 1533 | 38, 1534 | 0, 1535 | 46, 1536 | 0, 1537 | "CLIP_VISION" 1538 | ], 1539 | [ 1540 | 130, 1541 | 42, 1542 | 0, 1543 | 48, 1544 | 1, 1545 | "STYLE_MODEL" 1546 | ], 1547 | [ 1548 | 131, 1549 | 39, 1550 | 0, 1551 | 48, 1552 | 2, 1553 | "CLIP_VISION_OUTPUT" 1554 | ], 1555 | [ 1556 | 132, 1557 | 26, 1558 | 0, 1559 | 48, 1560 | 0, 1561 | "CONDITIONING" 1562 | ], 1563 | [ 1564 | 138, 1565 | 46, 1566 | 0, 1567 | 51, 1568 | 2, 1569 | "CLIP_VISION_OUTPUT" 1570 | ], 1571 | [ 1572 | 139, 1573 | 42, 1574 | 0, 1575 | 51, 1576 | 1, 1577 | "STYLE_MODEL" 1578 | ], 1579 | [ 1580 | 140, 1581 | 48, 1582 | 0, 1583 | 51, 1584 | 0, 1585 | "CONDITIONING" 1586 | ], 1587 | [ 1588 | 142, 1589 | 40, 1590 | 0, 1591 | 52, 1592 | 0, 1593 | "IMAGE" 1594 | ], 1595 | [ 1596 | 143, 1597 | 52, 1598 | 0, 1599 | 39, 1600 | 1, 1601 | "IMAGE" 1602 | ], 1603 | [ 1604 | 149, 1605 | 41, 1606 | 0, 1607 | 55, 1608 | 0, 1609 | "CONDITIONING" 1610 | ], 1611 | [ 1612 | 150, 1613 | 46, 1614 | 0, 1615 | 55, 1616 | 2, 1617 | "CLIP_VISION_OUTPUT" 1618 | ], 1619 | [ 1620 | 151, 1621 | 42, 1622 | 0, 1623 | 55, 1624 | 1, 1625 | "STYLE_MODEL" 1626 | ], 1627 | [ 1628 | 156, 1629 | 55, 1630 | 0, 1631 | 56, 1632 | 0, 1633 | "*" 1634 | ], 1635 | [ 1636 | 157, 1637 | 51, 1638 | 0, 1639 | 57, 1640 | 0, 1641 | "*" 1642 | ], 1643 | [ 1644 | 158, 1645 | 58, 1646 | 0, 1647 | 22, 1648 | 1, 1649 | "CONDITIONING" 1650 | ], 1651 | [ 1652 | 165, 1653 | 57, 1654 | 0, 1655 | 58, 1656 | 0, 1657 | "*" 1658 | ], 1659 | [ 1660 | 166, 1661 | 47, 1662 | 0, 1663 | 59, 1664 | 0, 1665 | "IMAGE" 1666 | ], 1667 | [ 1668 | 167, 1669 | 59, 1670 | 0, 1671 | 46, 1672 | 1, 1673 | "IMAGE" 1674 | ] 1675 | ], 1676 | "groups": [ 1677 | { 1678 | "id": 1, 1679 | "title": "Official Node", 1680 | "bounding": [ 1681 | 1179.19482421875, 1682 | -550.9763793945312, 1683 | 812, 1684 | 158 1685 | ], 1686 | "color": "#3f789e", 1687 | "font_size": 24, 1688 | "flags": {} 1689 | }, 1690 | { 1691 | "id": 2, 1692 | "title": "Modified Node", 1693 | "bounding": [ 1694 | 1175.7415771484375, 1695 | -296.3707580566406, 1696 | 828, 1697 | 278 1698 | ], 1699 | "color": "#3f789e", 1700 | "font_size": 24, 1701 | "flags": {} 1702 | }, 1703 | { 1704 | "id": 3, 1705 | "title": "Reference Image 2", 1706 | "bounding": [ 1707 | 2835.125732421875, 1708 | 481.0987243652344, 1709 | 816.7224731445312, 1710 | 1190.443603515625 1711 | ], 1712 | "color": "#3f789e", 1713 | "font_size": 50, 1714 | "flags": {} 1715 | }, 1716 | { 1717 | "id": 4, 1718 | "title": "Reference Image 1", 1719 | "bounding": [ 1720 | 999.69677734375, 1721 | 492.3728942871094, 1722 | 757.2908935546875, 1723 | 1176.6346435546875 1724 | ], 1725 | "color": "#3f789e", 1726 | "font_size": 50, 1727 | "flags": {} 1728 | }, 1729 | { 1730 | "id": 6, 1731 | "title": "OUT PUT", 1732 | "bounding": [ 1733 | 1820.11572265625, 1734 | 485.23406982421875, 1735 | 977.1715087890625, 1736 | 1190.94189453125 1737 | ], 1738 | "color": "#3f789e", 1739 | "font_size": 50, 1740 | "flags": {} 1741 | } 1742 | ], 1743 | "config": {}, 1744 | "extra": { 1745 | "ds": { 1746 | "scale": 0.34522712143933454, 1747 | "offset": [ 1748 | 314.0102996077815, 1749 | 719.7763344389753 1750 | ] 1751 | }, 1752 | "groupNodes": {} 1753 | }, 1754 | "version": 0.4 1755 | } -------------------------------------------------------------------------------- /example/redux semantic replacement image 1206.json: -------------------------------------------------------------------------------- 1 | { 2 | "last_node_id": 63, 3 | "last_link_id": 173, 4 | "nodes": [ 5 | { 6 | "id": 8, 7 | "type": "VAEDecode", 8 | "pos": [ 9 | 721, 10 | 370 11 | ], 12 | "size": [ 13 | 210, 14 | 46 15 | ], 16 | "flags": {}, 17 | "order": 20, 18 | "mode": 0, 19 | "inputs": [ 20 | { 21 | "name": "samples", 22 | "type": "LATENT", 23 | "link": 24, 24 | "label": "Latent" 25 | }, 26 | { 27 | "name": "vae", 28 | "type": "VAE", 29 | "link": 12, 30 | "label": "VAE" 31 | } 32 | ], 33 | "outputs": [ 34 | { 35 | "name": "IMAGE", 36 | "type": "IMAGE", 37 | "links": [ 38 | 9 39 | ], 40 | "slot_index": 0, 41 | "label": "图像" 42 | } 43 | ], 44 | "properties": { 45 | "Node name for S&R": "VAEDecode" 46 | }, 47 | "widgets_values": [] 48 | }, 49 | { 50 | "id": 10, 51 | "type": "VAELoader", 52 | "pos": [ 53 | 48, 54 | 429 55 | ], 56 | "size": [ 57 | 311.81634521484375, 58 | 60.429901123046875 59 | ], 60 | "flags": {}, 61 | "order": 0, 62 | "mode": 0, 63 | "inputs": [], 64 | "outputs": [ 65 | { 66 | "name": "VAE", 67 | "type": "VAE", 68 | "links": [ 69 | 12 70 | ], 71 | "slot_index": 0, 72 | "shape": 3, 73 | "label": "VAE" 74 | } 75 | ], 76 | "properties": { 77 | "Node name for S&R": "VAELoader" 78 | }, 79 | "widgets_values": [ 80 | "ae.sft" 81 | ] 82 | }, 83 | { 84 | "id": 12, 85 | "type": "UNETLoader", 86 | "pos": [ 87 | 48, 88 | 144 89 | ], 90 | "size": [ 91 | 315, 92 | 82 93 | ], 94 | "flags": {}, 95 | "order": 1, 96 | "mode": 0, 97 | "inputs": [], 98 | "outputs": [ 99 | { 100 | "name": "MODEL", 101 | "type": "MODEL", 102 | "links": [ 103 | 56 104 | ], 105 | "slot_index": 0, 106 | "shape": 3, 107 | "label": "模型" 108 | } 109 | ], 110 | "properties": { 111 | "Node name for S&R": "UNETLoader" 112 | }, 113 | "widgets_values": [ 114 | "flux1-dev-fp8-e4m3fn.safetensors", 115 | "fp8_e4m3fn" 116 | ], 117 | "color": "#223", 118 | "bgcolor": "#335" 119 | }, 120 | { 121 | "id": 16, 122 | "type": "KSamplerSelect", 123 | "pos": [ 124 | 480, 125 | 912 126 | ], 127 | "size": [ 128 | 315, 129 | 58 130 | ], 131 | "flags": {}, 132 | "order": 2, 133 | "mode": 0, 134 | "inputs": [], 135 | "outputs": [ 136 | { 137 | "name": "SAMPLER", 138 | "type": "SAMPLER", 139 | "links": [ 140 | 19 141 | ], 142 | "shape": 3, 143 | "label": "采样器" 144 | } 145 | ], 146 | "properties": { 147 | "Node name for S&R": "KSamplerSelect" 148 | }, 149 | "widgets_values": [ 150 | "euler" 151 | ] 152 | }, 153 | { 154 | "id": 25, 155 | "type": "RandomNoise", 156 | "pos": [ 157 | 480, 158 | 768 159 | ], 160 | "size": [ 161 | 315, 162 | 82 163 | ], 164 | "flags": {}, 165 | "order": 3, 166 | "mode": 0, 167 | "inputs": [], 168 | "outputs": [ 169 | { 170 | "name": "NOISE", 171 | "type": "NOISE", 172 | "links": [ 173 | 37 174 | ], 175 | "shape": 3, 176 | "label": "噪波生成" 177 | } 178 | ], 179 | "properties": { 180 | "Node name for S&R": "RandomNoise" 181 | }, 182 | "widgets_values": [ 183 | 185327202725181, 184 | "randomize" 185 | ], 186 | "color": "#2a363b", 187 | "bgcolor": "#3f5159" 188 | }, 189 | { 190 | "id": 27, 191 | "type": "EmptySD3LatentImage", 192 | "pos": [ 193 | 480, 194 | 624 195 | ], 196 | "size": [ 197 | 315, 198 | 106 199 | ], 200 | "flags": {}, 201 | "order": 10, 202 | "mode": 0, 203 | "inputs": [ 204 | { 205 | "name": "width", 206 | "type": "INT", 207 | "link": 112, 208 | "widget": { 209 | "name": "width" 210 | }, 211 | "label": "宽度" 212 | }, 213 | { 214 | "name": "height", 215 | "type": "INT", 216 | "link": 113, 217 | "widget": { 218 | "name": "height" 219 | }, 220 | "label": "高度" 221 | } 222 | ], 223 | "outputs": [ 224 | { 225 | "name": "LATENT", 226 | "type": "LATENT", 227 | "links": [ 228 | 116 229 | ], 230 | "slot_index": 0, 231 | "shape": 3, 232 | "label": "Latent" 233 | } 234 | ], 235 | "properties": { 236 | "Node name for S&R": "EmptySD3LatentImage" 237 | }, 238 | "widgets_values": [ 239 | 896, 240 | 1104, 241 | 1 242 | ] 243 | }, 244 | { 245 | "id": 34, 246 | "type": "PrimitiveNode", 247 | "pos": [ 248 | 432, 249 | 480 250 | ], 251 | "size": [ 252 | 210, 253 | 82 254 | ], 255 | "flags": {}, 256 | "order": 4, 257 | "mode": 0, 258 | "inputs": [], 259 | "outputs": [ 260 | { 261 | "name": "INT", 262 | "type": "INT", 263 | "links": [ 264 | 112, 265 | 115 266 | ], 267 | "slot_index": 0, 268 | "widget": { 269 | "name": "width" 270 | }, 271 | "label": "INT" 272 | } 273 | ], 274 | "properties": { 275 | "Run widget replace on values": false 276 | }, 277 | "widgets_values": [ 278 | 896, 279 | "fixed" 280 | ], 281 | "color": "#323", 282 | "bgcolor": "#535" 283 | }, 284 | { 285 | "id": 35, 286 | "type": "PrimitiveNode", 287 | "pos": [ 288 | 672, 289 | 480 290 | ], 291 | "size": [ 292 | 210, 293 | 82 294 | ], 295 | "flags": {}, 296 | "order": 5, 297 | "mode": 0, 298 | "inputs": [], 299 | "outputs": [ 300 | { 301 | "name": "INT", 302 | "type": "INT", 303 | "links": [ 304 | 113, 305 | 114 306 | ], 307 | "slot_index": 0, 308 | "widget": { 309 | "name": "height" 310 | }, 311 | "label": "INT" 312 | } 313 | ], 314 | "properties": { 315 | "Run widget replace on values": false 316 | }, 317 | "widgets_values": [ 318 | 1104, 319 | "fixed" 320 | ], 321 | "color": "#323", 322 | "bgcolor": "#535" 323 | }, 324 | { 325 | "id": 38, 326 | "type": "CLIPVisionLoader", 327 | "pos": [ 328 | 508.1814880371094, 329 | -306.04046630859375 330 | ], 331 | "size": [ 332 | 370, 333 | 60 334 | ], 335 | "flags": {}, 336 | "order": 6, 337 | "mode": 0, 338 | "inputs": [], 339 | "outputs": [ 340 | { 341 | "name": "CLIP_VISION", 342 | "type": "CLIP_VISION", 343 | "links": [ 344 | 117 345 | ], 346 | "slot_index": 0, 347 | "label": "CLIP视觉" 348 | } 349 | ], 350 | "properties": { 351 | "Node name for S&R": "CLIPVisionLoader" 352 | }, 353 | "widgets_values": [ 354 | "sigclip_vision_patch14_384.safetensors" 355 | ] 356 | }, 357 | { 358 | "id": 17, 359 | "type": "BasicScheduler", 360 | "pos": [ 361 | 480, 362 | 1008 363 | ], 364 | "size": [ 365 | 315, 366 | 106 367 | ], 368 | "flags": {}, 369 | "order": 14, 370 | "mode": 0, 371 | "inputs": [ 372 | { 373 | "name": "model", 374 | "type": "MODEL", 375 | "link": 55, 376 | "slot_index": 0, 377 | "label": "模型" 378 | } 379 | ], 380 | "outputs": [ 381 | { 382 | "name": "SIGMAS", 383 | "type": "SIGMAS", 384 | "links": [ 385 | 20 386 | ], 387 | "shape": 3, 388 | "label": "Sigmas" 389 | } 390 | ], 391 | "properties": { 392 | "Node name for S&R": "BasicScheduler" 393 | }, 394 | "widgets_values": [ 395 | "normal", 396 | 20, 397 | 1 398 | ] 399 | }, 400 | { 401 | "id": 22, 402 | "type": "BasicGuider", 403 | "pos": [ 404 | 1422.4232177734375, 405 | -246.7489776611328 406 | ], 407 | "size": [ 408 | 222.3482666015625, 409 | 46 410 | ], 411 | "flags": {}, 412 | "order": 18, 413 | "mode": 0, 414 | "inputs": [ 415 | { 416 | "name": "model", 417 | "type": "MODEL", 418 | "link": 54, 419 | "slot_index": 0, 420 | "label": "模型" 421 | }, 422 | { 423 | "name": "conditioning", 424 | "type": "CONDITIONING", 425 | "link": 173, 426 | "slot_index": 1, 427 | "label": "条件" 428 | } 429 | ], 430 | "outputs": [ 431 | { 432 | "name": "GUIDER", 433 | "type": "GUIDER", 434 | "links": [ 435 | 30 436 | ], 437 | "slot_index": 0, 438 | "shape": 3, 439 | "label": "引导" 440 | } 441 | ], 442 | "properties": { 443 | "Node name for S&R": "BasicGuider" 444 | }, 445 | "widgets_values": [] 446 | }, 447 | { 448 | "id": 39, 449 | "type": "CLIPVisionEncode", 450 | "pos": [ 451 | 508.01727294921875, 452 | -187.324462890625 453 | ], 454 | "size": [ 455 | 290, 456 | 78 457 | ], 458 | "flags": {}, 459 | "order": 16, 460 | "mode": 0, 461 | "inputs": [ 462 | { 463 | "name": "clip_vision", 464 | "type": "CLIP_VISION", 465 | "link": 117, 466 | "label": "CLIP视觉" 467 | }, 468 | { 469 | "name": "image", 470 | "type": "IMAGE", 471 | "link": 143, 472 | "label": "图像" 473 | } 474 | ], 475 | "outputs": [ 476 | { 477 | "name": "CLIP_VISION_OUTPUT", 478 | "type": "CLIP_VISION_OUTPUT", 479 | "links": [ 480 | 131 481 | ], 482 | "slot_index": 0, 483 | "label": "CLIP视觉输出" 484 | } 485 | ], 486 | "properties": { 487 | "Node name for S&R": "CLIPVisionEncode" 488 | }, 489 | "widgets_values": [ 490 | "center" 491 | ] 492 | }, 493 | { 494 | "id": 26, 495 | "type": "FluxGuidance", 496 | "pos": [ 497 | 468.4522705078125, 498 | 131.11563110351562 499 | ], 500 | "size": [ 501 | 317.4000244140625, 502 | 58 503 | ], 504 | "flags": {}, 505 | "order": 15, 506 | "mode": 0, 507 | "inputs": [ 508 | { 509 | "name": "conditioning", 510 | "type": "CONDITIONING", 511 | "link": 41, 512 | "label": "条件" 513 | } 514 | ], 515 | "outputs": [ 516 | { 517 | "name": "CONDITIONING", 518 | "type": "CONDITIONING", 519 | "links": [ 520 | 132 521 | ], 522 | "slot_index": 0, 523 | "shape": 3, 524 | "label": "条件" 525 | } 526 | ], 527 | "properties": { 528 | "Node name for S&R": "FluxGuidance" 529 | }, 530 | "widgets_values": [ 531 | 3.5 532 | ], 533 | "color": "#233", 534 | "bgcolor": "#355" 535 | }, 536 | { 537 | "id": 11, 538 | "type": "DualCLIPLoader", 539 | "pos": [ 540 | 49, 541 | 275 542 | ], 543 | "size": [ 544 | 315, 545 | 106 546 | ], 547 | "flags": {}, 548 | "order": 7, 549 | "mode": 0, 550 | "inputs": [], 551 | "outputs": [ 552 | { 553 | "name": "CLIP", 554 | "type": "CLIP", 555 | "links": [ 556 | 10 557 | ], 558 | "slot_index": 0, 559 | "shape": 3, 560 | "label": "CLIP" 561 | } 562 | ], 563 | "properties": { 564 | "Node name for S&R": "DualCLIPLoader" 565 | }, 566 | "widgets_values": [ 567 | "t5xxl_fp16.safetensors", 568 | "clip_l.safetensors", 569 | "flux" 570 | ] 571 | }, 572 | { 573 | "id": 13, 574 | "type": "SamplerCustomAdvanced", 575 | "pos": [ 576 | 168.6085205078125, 577 | 612.9359130859375 578 | ], 579 | "size": [ 580 | 272.3617858886719, 581 | 124.53733825683594 582 | ], 583 | "flags": {}, 584 | "order": 19, 585 | "mode": 0, 586 | "inputs": [ 587 | { 588 | "name": "noise", 589 | "type": "NOISE", 590 | "link": 37, 591 | "slot_index": 0, 592 | "label": "噪波生成" 593 | }, 594 | { 595 | "name": "guider", 596 | "type": "GUIDER", 597 | "link": 30, 598 | "slot_index": 1, 599 | "label": "引导" 600 | }, 601 | { 602 | "name": "sampler", 603 | "type": "SAMPLER", 604 | "link": 19, 605 | "slot_index": 2, 606 | "label": "采样器" 607 | }, 608 | { 609 | "name": "sigmas", 610 | "type": "SIGMAS", 611 | "link": 20, 612 | "slot_index": 3, 613 | "label": "Sigmas" 614 | }, 615 | { 616 | "name": "latent_image", 617 | "type": "LATENT", 618 | "link": 116, 619 | "slot_index": 4, 620 | "label": "Latent" 621 | } 622 | ], 623 | "outputs": [ 624 | { 625 | "name": "output", 626 | "type": "LATENT", 627 | "links": [ 628 | 24 629 | ], 630 | "slot_index": 0, 631 | "shape": 3, 632 | "label": "输出" 633 | }, 634 | { 635 | "name": "denoised_output", 636 | "type": "LATENT", 637 | "links": null, 638 | "shape": 3, 639 | "label": "降噪输出" 640 | } 641 | ], 642 | "properties": { 643 | "Node name for S&R": "SamplerCustomAdvanced" 644 | }, 645 | "widgets_values": [] 646 | }, 647 | { 648 | "id": 52, 649 | "type": "ImageScaleBy", 650 | "pos": [ 651 | 952, 652 | 198 653 | ], 654 | "size": [ 655 | 315, 656 | 82 657 | ], 658 | "flags": {}, 659 | "order": 13, 660 | "mode": 0, 661 | "inputs": [ 662 | { 663 | "name": "image", 664 | "type": "IMAGE", 665 | "link": 142, 666 | "label": "图像" 667 | } 668 | ], 669 | "outputs": [ 670 | { 671 | "name": "IMAGE", 672 | "type": "IMAGE", 673 | "links": [ 674 | 143 675 | ], 676 | "slot_index": 0, 677 | "label": "图像" 678 | } 679 | ], 680 | "properties": { 681 | "Node name for S&R": "ImageScaleBy" 682 | }, 683 | "widgets_values": [ 684 | "nearest-exact", 685 | 0.5 686 | ] 687 | }, 688 | { 689 | "id": 42, 690 | "type": "StyleModelLoader", 691 | "pos": [ 692 | 462.5000305175781, 693 | -0.050335563719272614 694 | ], 695 | "size": [ 696 | 340, 697 | 60 698 | ], 699 | "flags": {}, 700 | "order": 8, 701 | "mode": 0, 702 | "inputs": [], 703 | "outputs": [ 704 | { 705 | "name": "STYLE_MODEL", 706 | "type": "STYLE_MODEL", 707 | "links": [ 708 | 130 709 | ], 710 | "slot_index": 0, 711 | "label": "风格模型" 712 | } 713 | ], 714 | "properties": { 715 | "Node name for S&R": "StyleModelLoader" 716 | }, 717 | "widgets_values": [ 718 | "flux1-redux-dev.safetensors" 719 | ] 720 | }, 721 | { 722 | "id": 40, 723 | "type": "LoadImage", 724 | "pos": [ 725 | 1087.933837890625, 726 | 621.640380859375 727 | ], 728 | "size": [ 729 | 630.6736450195312, 730 | 788.0863647460938 731 | ], 732 | "flags": {}, 733 | "order": 9, 734 | "mode": 0, 735 | "inputs": [], 736 | "outputs": [ 737 | { 738 | "name": "IMAGE", 739 | "type": "IMAGE", 740 | "links": [ 741 | 142 742 | ], 743 | "slot_index": 0, 744 | "label": "图像" 745 | }, 746 | { 747 | "name": "MASK", 748 | "type": "MASK", 749 | "links": null, 750 | "label": "遮罩" 751 | } 752 | ], 753 | "properties": { 754 | "Node name for S&R": "LoadImage" 755 | }, 756 | "widgets_values": [ 757 | "output.png", 758 | "image" 759 | ] 760 | }, 761 | { 762 | "id": 30, 763 | "type": "ModelSamplingFlux", 764 | "pos": [ 765 | 101.46656799316406, 766 | 1215.0889892578125 767 | ], 768 | "size": [ 769 | 315, 770 | 130 771 | ], 772 | "flags": {}, 773 | "order": 11, 774 | "mode": 0, 775 | "inputs": [ 776 | { 777 | "name": "model", 778 | "type": "MODEL", 779 | "link": 56, 780 | "slot_index": 0, 781 | "label": "模型" 782 | }, 783 | { 784 | "name": "width", 785 | "type": "INT", 786 | "link": 115, 787 | "slot_index": 1, 788 | "widget": { 789 | "name": "width" 790 | }, 791 | "label": "宽度" 792 | }, 793 | { 794 | "name": "height", 795 | "type": "INT", 796 | "link": 114, 797 | "slot_index": 2, 798 | "widget": { 799 | "name": "height" 800 | }, 801 | "label": "高度" 802 | } 803 | ], 804 | "outputs": [ 805 | { 806 | "name": "MODEL", 807 | "type": "MODEL", 808 | "links": [ 809 | 54, 810 | 55 811 | ], 812 | "slot_index": 0, 813 | "shape": 3, 814 | "label": "模型" 815 | } 816 | ], 817 | "properties": { 818 | "Node name for S&R": "ModelSamplingFlux" 819 | }, 820 | "widgets_values": [ 821 | 1.15, 822 | 0.5, 823 | 896, 824 | 1104 825 | ] 826 | }, 827 | { 828 | "id": 9, 829 | "type": "SaveImage", 830 | "pos": [ 831 | 1824.2991943359375, 832 | 620.2451782226562 833 | ], 834 | "size": [ 835 | 723.6441040039062, 836 | 772.817626953125 837 | ], 838 | "flags": {}, 839 | "order": 21, 840 | "mode": 0, 841 | "inputs": [ 842 | { 843 | "name": "images", 844 | "type": "IMAGE", 845 | "link": 9, 846 | "label": "图像" 847 | } 848 | ], 849 | "outputs": [], 850 | "properties": { 851 | "Node name for S&R": "SaveImage" 852 | }, 853 | "widgets_values": [ 854 | "ComfyUI" 855 | ] 856 | }, 857 | { 858 | "id": 48, 859 | "type": "StyleModelAdvancedApply", 860 | "pos": [ 861 | 915.64892578125, 862 | -302.139404296875 863 | ], 864 | "size": [ 865 | 393, 866 | 314 867 | ], 868 | "flags": {}, 869 | "order": 17, 870 | "mode": 0, 871 | "inputs": [ 872 | { 873 | "name": "conditioning", 874 | "type": "CONDITIONING", 875 | "link": 132, 876 | "label": "conditioning" 877 | }, 878 | { 879 | "name": "style_model", 880 | "type": "STYLE_MODEL", 881 | "link": 130, 882 | "label": "style_model" 883 | }, 884 | { 885 | "name": "clip_vision_output", 886 | "type": "CLIP_VISION_OUTPUT", 887 | "link": 131, 888 | "label": "clip_vision_output" 889 | } 890 | ], 891 | "outputs": [ 892 | { 893 | "name": "CONDITIONING", 894 | "type": "CONDITIONING", 895 | "links": [ 896 | 173 897 | ], 898 | "slot_index": 0, 899 | "label": "CONDITIONING" 900 | } 901 | ], 902 | "properties": { 903 | "Node name for S&R": "StyleModelAdvancedApply" 904 | }, 905 | "widgets_values": [ 906 | 0.2, 907 | 0.15, 908 | 1, 909 | 0.05, 910 | 0.27, 911 | 0.5, 912 | 1.5 913 | ] 914 | }, 915 | { 916 | "id": 6, 917 | "type": "CLIPTextEncode", 918 | "pos": [ 919 | 1545.542236328125, 920 | 1426.9744873046875 921 | ], 922 | "size": [ 923 | 483.22930908203125, 924 | 107.73831176757812 925 | ], 926 | "flags": { 927 | "collapsed": false 928 | }, 929 | "order": 12, 930 | "mode": 0, 931 | "inputs": [ 932 | { 933 | "name": "clip", 934 | "type": "CLIP", 935 | "link": 10, 936 | "label": "CLIP" 937 | } 938 | ], 939 | "outputs": [ 940 | { 941 | "name": "CONDITIONING", 942 | "type": "CONDITIONING", 943 | "links": [ 944 | 41 945 | ], 946 | "slot_index": 0, 947 | "label": "条件" 948 | } 949 | ], 950 | "properties": { 951 | "Node name for S&R": "CLIPTextEncode" 952 | }, 953 | "widgets_values": [ 954 | "((( machine iron shape body,Lava scene))),(((robot head))),indoor scene\n", 955 | true 956 | ], 957 | "color": "#232", 958 | "bgcolor": "#353" 959 | } 960 | ], 961 | "links": [ 962 | [ 963 | 9, 964 | 8, 965 | 0, 966 | 9, 967 | 0, 968 | "IMAGE" 969 | ], 970 | [ 971 | 10, 972 | 11, 973 | 0, 974 | 6, 975 | 0, 976 | "CLIP" 977 | ], 978 | [ 979 | 12, 980 | 10, 981 | 0, 982 | 8, 983 | 1, 984 | "VAE" 985 | ], 986 | [ 987 | 19, 988 | 16, 989 | 0, 990 | 13, 991 | 2, 992 | "SAMPLER" 993 | ], 994 | [ 995 | 20, 996 | 17, 997 | 0, 998 | 13, 999 | 3, 1000 | "SIGMAS" 1001 | ], 1002 | [ 1003 | 24, 1004 | 13, 1005 | 0, 1006 | 8, 1007 | 0, 1008 | "LATENT" 1009 | ], 1010 | [ 1011 | 30, 1012 | 22, 1013 | 0, 1014 | 13, 1015 | 1, 1016 | "GUIDER" 1017 | ], 1018 | [ 1019 | 37, 1020 | 25, 1021 | 0, 1022 | 13, 1023 | 0, 1024 | "NOISE" 1025 | ], 1026 | [ 1027 | 41, 1028 | 6, 1029 | 0, 1030 | 26, 1031 | 0, 1032 | "CONDITIONING" 1033 | ], 1034 | [ 1035 | 54, 1036 | 30, 1037 | 0, 1038 | 22, 1039 | 0, 1040 | "MODEL" 1041 | ], 1042 | [ 1043 | 55, 1044 | 30, 1045 | 0, 1046 | 17, 1047 | 0, 1048 | "MODEL" 1049 | ], 1050 | [ 1051 | 56, 1052 | 12, 1053 | 0, 1054 | 30, 1055 | 0, 1056 | "MODEL" 1057 | ], 1058 | [ 1059 | 112, 1060 | 34, 1061 | 0, 1062 | 27, 1063 | 0, 1064 | "INT" 1065 | ], 1066 | [ 1067 | 113, 1068 | 35, 1069 | 0, 1070 | 27, 1071 | 1, 1072 | "INT" 1073 | ], 1074 | [ 1075 | 114, 1076 | 35, 1077 | 0, 1078 | 30, 1079 | 2, 1080 | "INT" 1081 | ], 1082 | [ 1083 | 115, 1084 | 34, 1085 | 0, 1086 | 30, 1087 | 1, 1088 | "INT" 1089 | ], 1090 | [ 1091 | 116, 1092 | 27, 1093 | 0, 1094 | 13, 1095 | 4, 1096 | "LATENT" 1097 | ], 1098 | [ 1099 | 117, 1100 | 38, 1101 | 0, 1102 | 39, 1103 | 0, 1104 | "CLIP_VISION" 1105 | ], 1106 | [ 1107 | 130, 1108 | 42, 1109 | 0, 1110 | 48, 1111 | 1, 1112 | "STYLE_MODEL" 1113 | ], 1114 | [ 1115 | 131, 1116 | 39, 1117 | 0, 1118 | 48, 1119 | 2, 1120 | "CLIP_VISION_OUTPUT" 1121 | ], 1122 | [ 1123 | 132, 1124 | 26, 1125 | 0, 1126 | 48, 1127 | 0, 1128 | "CONDITIONING" 1129 | ], 1130 | [ 1131 | 142, 1132 | 40, 1133 | 0, 1134 | 52, 1135 | 0, 1136 | "IMAGE" 1137 | ], 1138 | [ 1139 | 143, 1140 | 52, 1141 | 0, 1142 | 39, 1143 | 1, 1144 | "IMAGE" 1145 | ], 1146 | [ 1147 | 173, 1148 | 48, 1149 | 0, 1150 | 22, 1151 | 1, 1152 | "CONDITIONING" 1153 | ] 1154 | ], 1155 | "groups": [ 1156 | { 1157 | "id": 4, 1158 | "title": "Reference Image 1", 1159 | "bounding": [ 1160 | 995.73974609375, 1161 | 456.7608642578125, 1162 | 757.2908935546875, 1163 | 1176.6346435546875 1164 | ], 1165 | "color": "#3f789e", 1166 | "font_size": 50, 1167 | "flags": {} 1168 | }, 1169 | { 1170 | "id": 6, 1171 | "title": "OUT PUT", 1172 | "bounding": [ 1173 | 1782.5533447265625, 1174 | 446.5177917480469, 1175 | 977.1715087890625, 1176 | 1190.94189453125 1177 | ], 1178 | "color": "#3f789e", 1179 | "font_size": 50, 1180 | "flags": {} 1181 | } 1182 | ], 1183 | "config": {}, 1184 | "extra": { 1185 | "ds": { 1186 | "scale": 0.3452271214393943, 1187 | "offset": [ 1188 | 658.5866628269196, 1189 | 368.5536704813263 1190 | ] 1191 | }, 1192 | "groupNodes": {}, 1193 | "ue_links": [] 1194 | }, 1195 | "version": 0.4 1196 | } -------------------------------------------------------------------------------- /nodes.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import comfy.ops 3 | from comfy.ldm.flux.redux import ReduxImageEncoder 4 | import math 5 | 6 | # 获取ops引用 7 | ops = comfy.ops.manual_cast 8 | 9 | class StyleModelAdvancedApply: 10 | @classmethod 11 | def INPUT_TYPES(s): 12 | return {"required": { 13 | "conditioning": ("CONDITIONING",), 14 | "style_model": ("STYLE_MODEL",), 15 | "clip_vision_output": ("CLIP_VISION_OUTPUT",), 16 | "style_weight": ("FLOAT", { 17 | "default": 1.0, 18 | "min": 0.0, 19 | "max": 10.0, 20 | "step": 0.01, 21 | "tooltip": "控制整体艺术风格的权重" 22 | }), 23 | "color_weight": ("FLOAT", { 24 | "default": 1.0, 25 | "min": 0.0, 26 | "max": 10.0, 27 | "step": 0.01, 28 | "tooltip": "控制颜色特征的权重" 29 | }), 30 | "content_weight": ("FLOAT", { 31 | "default": 1.0, 32 | "min": 0.0, 33 | "max": 10.0, 34 | "step": 0.01, 35 | "tooltip": "控制内容语义的权重" 36 | }), 37 | "structure_weight": ("FLOAT", { 38 | "default": 1.0, 39 | "min": 0.0, 40 | "max": 10.0, 41 | "step": 0.01, 42 | "tooltip": "控制结构布局的权重" 43 | }), 44 | "texture_weight": ("FLOAT", { 45 | "default": 1.0, 46 | "min": 0.0, 47 | "max": 10.0, 48 | "step": 0.01, 49 | "tooltip": "控制纹理细节的权重" 50 | }), 51 | "similarity_threshold": ("FLOAT", { 52 | "default": 0.7, 53 | "min": 0.0, 54 | "max": 1.0, 55 | "step": 0.01, 56 | "tooltip": "特征相似度阈值,超过此值的区域将被替换" 57 | }), 58 | "enhancement_base": ("FLOAT", { 59 | "default": 1.5, 60 | "min": 1.0, 61 | "max": 3.0, 62 | "step": 0.1, 63 | "tooltip": "文本特征替换的基础增强系数" 64 | }) 65 | }} 66 | 67 | RETURN_TYPES = ("CONDITIONING",) 68 | FUNCTION = "apply_style" 69 | CATEGORY = "conditioning/style_model" 70 | 71 | def __init__(self): 72 | self.text_projector = ops.Linear(4096, 4096) # 保持维度一致 73 | # 为不同类型特征设置增强系数 74 | self.enhancement_factors = { 75 | 'style': 1.2, # 风格特征增强系数 76 | 'color': 1.0, # 颜色特征增强系数 77 | 'content': 1.1, # 内容特征增强系数 78 | 'structure': 1.3, # 结构特征增强系数 79 | 'texture': 1.0 # 纹理特征增强系数 80 | } 81 | 82 | def compute_similarity(self, text_feat, image_feat): 83 | """计算多种相似度的组合""" 84 | # 1. 余弦相似度 85 | cos_sim = torch.cosine_similarity(text_feat, image_feat, dim=-1) 86 | 87 | # 2. L2距离相似度(归一化后的欧氏距离) 88 | l2_dist = torch.norm(text_feat - image_feat, p=2, dim=-1) 89 | l2_sim = 1 / (1 + l2_dist) # 转换为相似度 90 | 91 | # 3. 点积相似度(考虑特征的强度) 92 | dot_sim = torch.sum(text_feat * image_feat, dim=-1) 93 | dot_sim = torch.tanh(dot_sim) # 归一化到[-1,1] 94 | 95 | # 4. 注意力相似度 96 | attn_weights = torch.softmax(torch.matmul(text_feat, image_feat.transpose(-2, -1)) / math.sqrt(text_feat.size(-1)), dim=-1) 97 | attn_sim = torch.mean(attn_weights, dim=-1) 98 | 99 | # 组合所有相似度(可以调整权重) 100 | combined_sim = ( 101 | 0.4 * cos_sim + 102 | 0.2 * l2_sim + 103 | 0.2 * dot_sim + 104 | 0.2 * attn_sim 105 | ) 106 | 107 | return combined_sim.mean() 108 | 109 | def apply_style(self, clip_vision_output, style_model, conditioning, 110 | style_weight=1.0, color_weight=1.0, content_weight=1.0, 111 | structure_weight=1.0, texture_weight=1.0, 112 | similarity_threshold=0.7, enhancement_base=1.5): 113 | 114 | # 获取图像特征并展平 115 | image_cond = style_model.get_cond(clip_vision_output).flatten(start_dim=0, end_dim=1) 116 | 117 | # 获取文本特征并调整维度 118 | text_features = conditioning[0][0] # [batch_size, seq_len, 4096] 119 | text_features = text_features.mean(dim=1) # [batch_size, 4096] 120 | 121 | # 投影文本特征(保持4096维度) 122 | text_features = self.text_projector(text_features) # [batch_size, 4096] 123 | 124 | # 确保batch维度匹配 125 | if text_features.shape[0] != image_cond.shape[0]: 126 | text_features = text_features.expand(image_cond.shape[0], -1) 127 | 128 | # 分解图像特征为5个区域 129 | feature_size = image_cond.shape[-1] # 4096 130 | splits = feature_size // 5 # 每部分约819维 131 | 132 | # 分离图像的不同类型特征 133 | image_features = { 134 | 'style': image_cond[..., :splits], 135 | 'color': image_cond[..., splits:splits*2], 136 | 'content': image_cond[..., splits*2:splits*3], 137 | 'structure': image_cond[..., splits*3:splits*4], 138 | 'texture': image_cond[..., splits*4:] 139 | } 140 | 141 | # 计算每个区域与文本特征的相似度 142 | similarities = {} 143 | for key, region_features in image_features.items(): 144 | # 将文本特征调整为对应区域的维度 145 | region_text_features = text_features[..., :region_features.shape[-1]] 146 | # 使用多种相似度度量的组合 147 | similarities[key] = self.compute_similarity(region_text_features, region_features) 148 | 149 | # 根据相似度和阈值决定替换,并应用增强 150 | final_features = {} 151 | weights = { 152 | 'style': style_weight, 153 | 'color': color_weight, 154 | 'content': content_weight, 155 | 'structure': structure_weight, 156 | 'texture': texture_weight 157 | } 158 | 159 | for key in image_features: 160 | if similarities[key] > similarity_threshold: 161 | # 相似度高的区域,用增强后的文本特征替换 162 | region_size = image_features[key].shape[-1] 163 | # 计算动态增强系数 164 | dynamic_factor = enhancement_base * self.enhancement_factors[key] 165 | # 应用特征替换和增强 166 | final_features[key] = text_features[..., :region_size] * weights[key] * dynamic_factor 167 | else: 168 | # 保持原图像特征 169 | final_features[key] = image_features[key] * weights[key] 170 | 171 | # 合并所有特征 172 | combined_cond = torch.cat([ 173 | final_features['style'], 174 | final_features['color'], 175 | final_features['content'], 176 | final_features['structure'], 177 | final_features['texture'] 178 | ], dim=-1).unsqueeze(dim=0) 179 | 180 | # 构建新的条件 181 | c = [] 182 | for t in conditioning: 183 | n = [torch.cat((t[0], combined_cond), dim=1), t[1].copy()] 184 | c.append(n) 185 | 186 | return (c,) 187 | 188 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "flux_style_adjust" 3 | description = "StyleModelApply adds more controls" 4 | version = "1.0.0" 5 | license = {file = "LICENSE"} 6 | 7 | [project.urls] 8 | Repository = "https://github.com/yichengup/Comfyui_Flux_Style_Adjust" 9 | # Used by Comfy Registry https://comfyregistry.org 10 | 11 | [tool.comfy] 12 | PublisherId = "" 13 | DisplayName = "Comfyui_Flux_Style_Adjust" 14 | Icon = "" 15 | --------------------------------------------------------------------------------