Skip to content

fix: ksampler error when the tensor is not contiguous #535 - #673

Merged
lmxyy merged 3 commits into
nunchaku-ai:mainfrom
wallen0322:wallen0322-patch-1
Sep 8, 2025
Merged

fix: ksampler error when the tensor is not contiguous #535#673
lmxyy merged 3 commits into
nunchaku-ai:mainfrom
wallen0322:wallen0322-patch-1

Conversation

@wallen0322

@wallen0322 wallen0322 commented Sep 7, 2025

Copy link
Copy Markdown
Contributor

fix nunchaku-ai/ComfyUI-nunchaku#535

Motivation

Modifications

Checklist

  • Code is formatted using Pre-Commit hooks.
  • Relevant unit tests are added in the tests directory following the guidance in Contribution Guide.
  • Documentation and example scripts in examples are updated if necessary.
  • Throughput/latency benchmarks and quality evaluations are included where applicable.
  • For reviewers: If you're only helping merge the main branch and haven't contributed code to this PR, please remove yourself as a co-author when merging.
  • Please feel free to join our Slack, Discord or WeChat to discuss your PR.

@lmxyy lmxyy changed the title fix [Bug] ksampler error #535 fix: ksampler error #535 Sep 7, 2025
@lmxyy lmxyy changed the title fix: ksampler error #535 fix: ksampler error when the tensor is not contiguous #535 Sep 7, 2025

@lmxyy lmxyy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@lmxyy
lmxyy merged commit ced8462 into nunchaku-ai:main Sep 8, 2025
3 checks passed
@hubentu

hubentu commented Sep 12, 2025

Copy link
Copy Markdown

@lmxyy Could you please release a compiled nightly version? Thanks!

@lmxyy

lmxyy commented Sep 12, 2025

Copy link
Copy Markdown
Collaborator

@lmxyy Could you please release a compiled nightly version? Thanks!

gotcha.

@Xingyu-Romantic

Xingyu-Romantic commented Sep 25, 2025

Copy link
Copy Markdown

i have a issue about "contiguous "

{
  "id": "b06dfbd7-205e-453b-8f49-6b033edd7f96",
  "revision": 0,
  "last_node_id": 91,
  "last_link_id": 138,
  "nodes": [
    {
      "id": 68,
      "type": "ConditioningZeroOut",
      "pos": [
        721.7047729492188,
        287.5419616699219
      ],
      "size": [
        197.712890625,
        26
      ],
      "flags": {},
      "order": 12,
      "mode": 0,
      "inputs": [
        {
          "name": "conditioning",
          "type": "CONDITIONING",
          "link": 105
        }
      ],
      "outputs": [
        {
          "name": "CONDITIONING",
          "type": "CONDITIONING",
          "links": [
            104
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "ConditioningZeroOut"
      },
      "widgets_values": []
    },
    {
      "id": 62,
      "type": "NunchakuFluxDiTLoader",
      "pos": [
        -132.36669921875,
        51.04208755493164
      ],
      "size": [
        275.7613220214844,
        202
      ],
      "flags": {},
      "order": 0,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "MODEL",
          "type": "MODEL",
          "links": [
            125
          ]
        }
      ],
      "properties": {
        "cnr_id": "ComfyUI-nunchaku",
        "ver": "9b6c0625cb0757496fbc7743f65cf12649d852ef",
        "Node name for S&R": "NunchakuFluxDiTLoader",
        "aux_id": "nunchaku-tech/ComfyUI-nunchaku"
      },
      "widgets_values": [
        "svdq-int4_r32-flux.1-dev.safetensors",
        0,
        "nunchaku-fp16",
        "auto",
        0,
        "bfloat16",
        "enabled"
      ]
    },
    {
      "id": 81,
      "type": "PromptTextTranslation",
      "pos": [
        204.0387725830078,
        234.72515869140625
      ],
      "size": [
        310.8618469238281,
        198.81944274902344
      ],
      "flags": {},
      "order": 1,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "STRING",
          "type": "STRING",
          "links": [
            121
          ]
        }
      ],
      "properties": {
        "aux_id": "MofaAI/ComfyUI-Prompt-Translator",
        "ver": "cf31713673150e97f1ae835af0a95eb0133b5470",
        "Node name for S&R": "PromptTextTranslation"
      },
      "widgets_values": [
        "JKC,Irene,yabi,awj,This is a high-resolution,professional photograph of a young Asian woman with fair skin and delicate features. She has a slender build and is wearing a simple,white spaghetti-strap top that contrasts with her dark hair,which is pulled back and slightly tousled. Her large,almond-shaped brown eyes are the focal point of the image,framed by delicate,well-groomed eyebrows. Her lips are naturally pink and slightly parted,giving her a serene expression., She is holding a small,white lily with green leaves close to her face,with her left hand gently touching the petals. The background is a solid,deep black,which enhances the brightness and clarity of her complexion and the vividness of the flower. The lighting is soft and even,highlighting the smooth texture of her skin and the glossy surface of the flower petals., The overall mood of the photograph is calm and introspective,with a focus on the natural beauty of the subject and the delicate flower. The image is likely part of a high-fashion or fine art photography project,emphasizing minimalism and natural elegance",
        "",
        "enabled"
      ]
    },
    {
      "id": 83,
      "type": "ModelSamplingFlux",
      "pos": [
        218.9453887939453,
        43.088661193847656
      ],
      "size": [
        270,
        130
      ],
      "flags": {},
      "order": 6,
      "mode": 0,
      "inputs": [
        {
          "name": "model",
          "type": "MODEL",
          "link": 125
        }
      ],
      "outputs": [
        {
          "name": "MODEL",
          "type": "MODEL",
          "links": [
            126
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "ModelSamplingFlux"
      },
      "widgets_values": [
        1.15,
        0.5,
        1024,
        1024
      ]
    },
    {
      "id": 86,
      "type": "EmptyLatentImage",
      "pos": [
        573.2306518554688,
        607.3743896484375
      ],
      "size": [
        270,
        106
      ],
      "flags": {},
      "order": 13,
      "mode": 0,
      "inputs": [
        {
          "name": "width",
          "type": "INT",
          "widget": {
            "name": "width"
          },
          "link": 134
        },
        {
          "name": "height",
          "type": "INT",
          "widget": {
            "name": "height"
          },
          "link": 135
        },
        {
          "name": "batch_size",
          "type": "INT",
          "widget": {
            "name": "batch_size"
          },
          "link": 137
        }
      ],
      "outputs": [
        {
          "name": "LATENT",
          "type": "LATENT",
          "links": [
            130
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "EmptyLatentImage"
      },
      "widgets_values": [
        512,
        512,
        1
      ]
    },
    {
      "id": 88,
      "type": "ImpactSwitch",
      "pos": [
        890.3735961914062,
        370.2314453125
      ],
      "size": [
        270,
        142
      ],
      "flags": {},
      "order": 15,
      "mode": 0,
      "inputs": [
        {
          "name": "input1",
          "shape": 7,
          "type": "*",
          "link": 129
        },
        {
          "name": "input2",
          "type": "LATENT",
          "link": 130
        },
        {
          "name": "input3",
          "type": "LATENT",
          "link": 132
        },
        {
          "name": "input4",
          "type": "LATENT",
          "link": null
        }
      ],
      "outputs": [
        {
          "label": "LATENT",
          "name": "selected_value",
          "type": "*",
          "links": [
            133
          ]
        },
        {
          "name": "selected_label",
          "type": "STRING",
          "links": null
        },
        {
          "name": "selected_index",
          "type": "INT",
          "links": null
        }
      ],
      "properties": {
        "cnr_id": "comfyui-impact-pack",
        "ver": "f86c5afc68958afb89bf66898d6b5038ce98a096",
        "Node name for S&R": "ImpactSwitch"
      },
      "widgets_values": [
        1,
        false
      ]
    },
    {
      "id": 84,
      "type": "StarFlowRatioLatentConstructor",
      "pos": [
        572.5165405273438,
        378.088623046875
      ],
      "size": [
        270,
        166
      ],
      "flags": {},
      "order": 7,
      "mode": 0,
      "inputs": [
        {
          "name": "batch_size",
          "type": "INT",
          "widget": {
            "name": "batch_size"
          },
          "link": 136
        }
      ],
      "outputs": [
        {
          "name": "latent",
          "type": "LATENT",
          "links": [
            129
          ]
        },
        {
          "name": "width",
          "type": "INT",
          "links": null
        },
        {
          "name": "height",
          "type": "INT",
          "links": null
        },
        {
          "name": "channels",
          "type": "INT",
          "links": null
        }
      ],
      "properties": {
        "Node name for S&R": "StarFlowRatioLatentConstructor"
      },
      "widgets_values": [
        "3:4",
        1,
        16
      ]
    },
    {
      "id": 82,
      "type": "SaveImage",
      "pos": [
        1480.199462890625,
        -90.35010528564453
      ],
      "size": [
        484.28564453125,
        537.4143676757812
      ],
      "flags": {},
      "order": 18,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 123
        }
      ],
      "outputs": [],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "SaveImage"
      },
      "widgets_values": [
        "ComfyUI"
      ]
    },
    {
      "id": 91,
      "type": "Int",
      "pos": [
        121.22533416748047,
        656.969482421875
      ],
      "size": [
        270,
        58
      ],
      "flags": {},
      "order": 2,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "INT",
          "type": "INT",
          "links": [
            136,
            137,
            138
          ]
        }
      ],
      "properties": {
        "cnr_id": "ComfyLiterals",
        "ver": "bdddb08ca82d90d75d97b1d437a652e0284a32ac",
        "Node name for S&R": "Int"
      },
      "widgets_values": [
        "2"
      ]
    },
    {
      "id": 70,
      "type": "NunchakuTextEncoderLoaderV2",
      "pos": [
        -130.00958251953125,
        311.11370849609375
      ],
      "size": [
        266.7509765625,
        136.2857208251953
      ],
      "flags": {},
      "order": 3,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "CLIP",
          "type": "CLIP",
          "links": [
            107
          ]
        }
      ],
      "properties": {
        "cnr_id": "ComfyUI-nunchaku",
        "ver": "9b6c0625cb0757496fbc7743f65cf12649d852ef",
        "Node name for S&R": "NunchakuTextEncoderLoaderV2",
        "aux_id": "nunchaku-tech/ComfyUI-nunchaku"
      },
      "widgets_values": [
        "flux.1",
        "clip_l.safetensors",
        "t5xxl_fp8_e4m3fn.safetensors",
        1024
      ]
    },
    {
      "id": 73,
      "type": "VAELoader",
      "pos": [
        -133.01913452148438,
        519.6016845703125
      ],
      "size": [
        270,
        58
      ],
      "flags": {},
      "order": 4,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "VAE",
          "type": "VAE",
          "links": [
            110
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "VAELoader"
      },
      "widgets_values": [
        "ae.safetensors"
      ]
    },
    {
      "id": 72,
      "type": "VAEDecode",
      "pos": [
        1286.4931640625,
        -119.40676879882812
      ],
      "size": [
        140,
        46
      ],
      "flags": {},
      "order": 17,
      "mode": 0,
      "inputs": [
        {
          "name": "samples",
          "type": "LATENT",
          "link": 109
        },
        {
          "name": "vae",
          "type": "VAE",
          "link": 110
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            123
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "VAEDecode"
      },
      "widgets_values": []
    },
    {
      "id": 90,
      "type": "EmptyLatentImage",
      "pos": [
        572.5165405273438,
        773.8029174804688
      ],
      "size": [
        270,
        106
      ],
      "flags": {},
      "order": 8,
      "mode": 0,
      "inputs": [
        {
          "name": "batch_size",
          "type": "INT",
          "widget": {
            "name": "batch_size"
          },
          "link": 138
        }
      ],
      "outputs": [
        {
          "name": "LATENT",
          "type": "LATENT",
          "links": [
            132
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "EmptyLatentImage"
      },
      "widgets_values": [
        1024,
        1232,
        1
      ]
    },
    {
      "id": 54,
      "type": "LayerUtility: ImageScaleByAspectRatio V2",
      "pos": [
        196.5135498046875,
        -340.6358337402344
      ],
      "size": [
        303.6851501464844,
        330
      ],
      "flags": {},
      "order": 10,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "shape": 7,
          "type": "IMAGE",
          "link": 72
        },
        {
          "name": "mask",
          "shape": 7,
          "type": "MASK",
          "link": null
        }
      ],
      "outputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "links": [
            101
          ]
        },
        {
          "name": "mask",
          "type": "MASK",
          "links": null
        },
        {
          "name": "original_size",
          "type": "BOX",
          "links": null
        },
        {
          "name": "width",
          "type": "INT",
          "links": [
            134
          ]
        },
        {
          "name": "height",
          "type": "INT",
          "links": [
            135
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfyui_layerstyle",
        "ver": "3bfe8e435d167b4a5bf08716729f89802dbbaa6f",
        "Node name for S&R": "LayerUtility: ImageScaleByAspectRatio V2"
      },
      "widgets_values": [
        "original",
        1,
        1,
        "letterbox",
        "lanczos",
        "8",
        "longest",
        1024,
        "#000000"
      ],
      "color": "rgba(38, 73, 116, 0.7)"
    },
    {
      "id": 65,
      "type": "NunchakuPuLIDLoaderV2",
      "pos": [
        567.7080078125,
        -260.4316101074219
      ],
      "size": [
        278.0703125,
        126
      ],
      "flags": {},
      "order": 11,
      "mode": 0,
      "inputs": [
        {
          "name": "model",
          "type": "MODEL",
          "link": 126
        }
      ],
      "outputs": [
        {
          "name": "MODEL",
          "type": "MODEL",
          "links": [
            100
          ]
        },
        {
          "name": "PULID_PIPELINE",
          "type": "PULID_PIPELINE",
          "links": [
            99
          ]
        }
      ],
      "properties": {
        "cnr_id": "ComfyUI-nunchaku",
        "ver": "9b6c0625cb0757496fbc7743f65cf12649d852ef",
        "Node name for S&R": "NunchakuPuLIDLoaderV2",
        "aux_id": "nunchaku-tech/ComfyUI-nunchaku"
      },
      "widgets_values": [
        "pulid_flux_v0.9.1.safetensors",
        "EVA02_CLIP_L_336_psz14_s6B.pt",
        "gpu"
      ]
    },
    {
      "id": 67,
      "type": "CLIPTextEncode",
      "pos": [
        601.0728759765625,
        -61.097694396972656
      ],
      "size": [
        400,
        200
      ],
      "flags": {},
      "order": 9,
      "mode": 0,
      "inputs": [
        {
          "name": "clip",
          "type": "CLIP",
          "link": 107
        },
        {
          "name": "text",
          "type": "STRING",
          "widget": {
            "name": "text"
          },
          "link": 121
        }
      ],
      "outputs": [
        {
          "name": "CONDITIONING",
          "type": "CONDITIONING",
          "links": [
            103,
            105
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "CLIPTextEncode"
      },
      "widgets_values": [
        "chibi style, a character stand here, the background is white and pure"
      ]
    },
    {
      "id": 46,
      "type": "LoadImage",
      "pos": [
        -116.68460845947266,
        -330.92724609375
      ],
      "size": [
        274.080078125,
        314
      ],
      "flags": {},
      "order": 5,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            72
          ]
        },
        {
          "name": "MASK",
          "type": "MASK",
          "links": null
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.49",
        "Node name for S&R": "LoadImage"
      },
      "widgets_values": [
        "下载.jpeg",
        "image"
      ]
    },
    {
      "id": 66,
      "type": "NunchakuFluxPuLIDApplyV2",
      "pos": [
        913.7849731445312,
        -360.912109375
      ],
      "size": [
        305.3404235839844,
        186
      ],
      "flags": {},
      "order": 14,
      "mode": 0,
      "inputs": [
        {
          "name": "model",
          "type": "MODEL",
          "link": 100
        },
        {
          "name": "pulid_pipline",
          "type": "PULID_PIPELINE",
          "link": 99
        },
        {
          "name": "image",
          "type": "IMAGE",
          "link": 101
        },
        {
          "name": "attn_mask",
          "shape": 7,
          "type": "MASK",
          "link": null
        },
        {
          "name": "options",
          "shape": 7,
          "type": "OPTIONS",
          "link": null
        }
      ],
      "outputs": [
        {
          "name": "MODEL",
          "type": "MODEL",
          "links": [
            102
          ]
        }
      ],
      "properties": {
        "cnr_id": "ComfyUI-nunchaku",
        "ver": "9b6c0625cb0757496fbc7743f65cf12649d852ef",
        "Node name for S&R": "NunchakuFluxPuLIDApplyV2",
        "aux_id": "nunchaku-tech/ComfyUI-nunchaku"
      },
      "widgets_values": [
        1,
        0,
        1
      ]
    },
    {
      "id": 63,
      "type": "KSampler",
      "pos": [
        1217.694580078125,
        41.484039306640625
      ],
      "size": [
        270,
        262
      ],
      "flags": {},
      "order": 16,
      "mode": 0,
      "inputs": [
        {
          "name": "model",
          "type": "MODEL",
          "link": 102
        },
        {
          "name": "positive",
          "type": "CONDITIONING",
          "link": 103
        },
        {
          "name": "negative",
          "type": "CONDITIONING",
          "link": 104
        },
        {
          "name": "latent_image",
          "type": "LATENT",
          "link": 133
        }
      ],
      "outputs": [
        {
          "name": "LATENT",
          "type": "LATENT",
          "links": [
            109
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "KSampler"
      },
      "widgets_values": [
        1013877930502019,
        "randomize",
        20,
        1,
        "euler",
        "simple",
        1
      ]
    }
  ],
  "links": [
    [
      72,
      46,
      0,
      54,
      0,
      "IMAGE"
    ],
    [
      99,
      65,
      1,
      66,
      1,
      "PULID_PIPELINE"
    ],
    [
      100,
      65,
      0,
      66,
      0,
      "MODEL"
    ],
    [
      101,
      54,
      0,
      66,
      2,
      "IMAGE"
    ],
    [
      102,
      66,
      0,
      63,
      0,
      "MODEL"
    ],
    [
      103,
      67,
      0,
      63,
      1,
      "CONDITIONING"
    ],
    [
      104,
      68,
      0,
      63,
      2,
      "CONDITIONING"
    ],
    [
      105,
      67,
      0,
      68,
      0,
      "CONDITIONING"
    ],
    [
      107,
      70,
      0,
      67,
      0,
      "CLIP"
    ],
    [
      109,
      63,
      0,
      72,
      0,
      "LATENT"
    ],
    [
      110,
      73,
      0,
      72,
      1,
      "VAE"
    ],
    [
      121,
      81,
      0,
      67,
      1,
      "STRING"
    ],
    [
      123,
      72,
      0,
      82,
      0,
      "IMAGE"
    ],
    [
      125,
      62,
      0,
      83,
      0,
      "MODEL"
    ],
    [
      126,
      83,
      0,
      65,
      0,
      "MODEL"
    ],
    [
      129,
      84,
      0,
      88,
      0,
      "*"
    ],
    [
      130,
      86,
      0,
      88,
      1,
      "LATENT"
    ],
    [
      132,
      90,
      0,
      88,
      2,
      "LATENT"
    ],
    [
      133,
      88,
      0,
      63,
      3,
      "LATENT"
    ],
    [
      134,
      54,
      3,
      86,
      0,
      "INT"
    ],
    [
      135,
      54,
      4,
      86,
      1,
      "INT"
    ],
    [
      136,
      91,
      0,
      84,
      0,
      "INT"
    ],
    [
      137,
      91,
      0,
      86,
      2,
      "INT"
    ],
    [
      138,
      91,
      0,
      90,
      0,
      "INT"
    ]
  ],
  "groups": [],
  "config": {},
  "extra": {
    "ds": {
      "scale": 1.771561000000001,
      "offset": [
        -564.5205384817389,
        698.3787575719946
      ]
    },
    "frontendVersion": "1.24.4",
    "VHS_latentpreview": false,
    "VHS_latentpreviewrate": 0,
    "VHS_MetadataImage": true,
    "VHS_KeepIntermediate": true
  },
  "version": 0.4
}
nunchaku                   1.0.1.dev20250922+torch2.8
image

@lmxyy

lmxyy commented Sep 25, 2025

Copy link
Copy Markdown
Collaborator

i have a issue about "contiguous "

{
  "id": "b06dfbd7-205e-453b-8f49-6b033edd7f96",
  "revision": 0,
  "last_node_id": 91,
  "last_link_id": 138,
  "nodes": [
    {
      "id": 68,
      "type": "ConditioningZeroOut",
      "pos": [
        721.7047729492188,
        287.5419616699219
      ],
      "size": [
        197.712890625,
        26
      ],
      "flags": {},
      "order": 12,
      "mode": 0,
      "inputs": [
        {
          "name": "conditioning",
          "type": "CONDITIONING",
          "link": 105
        }
      ],
      "outputs": [
        {
          "name": "CONDITIONING",
          "type": "CONDITIONING",
          "links": [
            104
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "ConditioningZeroOut"
      },
      "widgets_values": []
    },
    {
      "id": 62,
      "type": "NunchakuFluxDiTLoader",
      "pos": [
        -132.36669921875,
        51.04208755493164
      ],
      "size": [
        275.7613220214844,
        202
      ],
      "flags": {},
      "order": 0,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "MODEL",
          "type": "MODEL",
          "links": [
            125
          ]
        }
      ],
      "properties": {
        "cnr_id": "ComfyUI-nunchaku",
        "ver": "9b6c0625cb0757496fbc7743f65cf12649d852ef",
        "Node name for S&R": "NunchakuFluxDiTLoader",
        "aux_id": "nunchaku-tech/ComfyUI-nunchaku"
      },
      "widgets_values": [
        "svdq-int4_r32-flux.1-dev.safetensors",
        0,
        "nunchaku-fp16",
        "auto",
        0,
        "bfloat16",
        "enabled"
      ]
    },
    {
      "id": 81,
      "type": "PromptTextTranslation",
      "pos": [
        204.0387725830078,
        234.72515869140625
      ],
      "size": [
        310.8618469238281,
        198.81944274902344
      ],
      "flags": {},
      "order": 1,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "STRING",
          "type": "STRING",
          "links": [
            121
          ]
        }
      ],
      "properties": {
        "aux_id": "MofaAI/ComfyUI-Prompt-Translator",
        "ver": "cf31713673150e97f1ae835af0a95eb0133b5470",
        "Node name for S&R": "PromptTextTranslation"
      },
      "widgets_values": [
        "JKC,Irene,yabi,awj,This is a high-resolution,professional photograph of a young Asian woman with fair skin and delicate features. She has a slender build and is wearing a simple,white spaghetti-strap top that contrasts with her dark hair,which is pulled back and slightly tousled. Her large,almond-shaped brown eyes are the focal point of the image,framed by delicate,well-groomed eyebrows. Her lips are naturally pink and slightly parted,giving her a serene expression., She is holding a small,white lily with green leaves close to her face,with her left hand gently touching the petals. The background is a solid,deep black,which enhances the brightness and clarity of her complexion and the vividness of the flower. The lighting is soft and even,highlighting the smooth texture of her skin and the glossy surface of the flower petals., The overall mood of the photograph is calm and introspective,with a focus on the natural beauty of the subject and the delicate flower. The image is likely part of a high-fashion or fine art photography project,emphasizing minimalism and natural elegance",
        "",
        "enabled"
      ]
    },
    {
      "id": 83,
      "type": "ModelSamplingFlux",
      "pos": [
        218.9453887939453,
        43.088661193847656
      ],
      "size": [
        270,
        130
      ],
      "flags": {},
      "order": 6,
      "mode": 0,
      "inputs": [
        {
          "name": "model",
          "type": "MODEL",
          "link": 125
        }
      ],
      "outputs": [
        {
          "name": "MODEL",
          "type": "MODEL",
          "links": [
            126
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "ModelSamplingFlux"
      },
      "widgets_values": [
        1.15,
        0.5,
        1024,
        1024
      ]
    },
    {
      "id": 86,
      "type": "EmptyLatentImage",
      "pos": [
        573.2306518554688,
        607.3743896484375
      ],
      "size": [
        270,
        106
      ],
      "flags": {},
      "order": 13,
      "mode": 0,
      "inputs": [
        {
          "name": "width",
          "type": "INT",
          "widget": {
            "name": "width"
          },
          "link": 134
        },
        {
          "name": "height",
          "type": "INT",
          "widget": {
            "name": "height"
          },
          "link": 135
        },
        {
          "name": "batch_size",
          "type": "INT",
          "widget": {
            "name": "batch_size"
          },
          "link": 137
        }
      ],
      "outputs": [
        {
          "name": "LATENT",
          "type": "LATENT",
          "links": [
            130
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "EmptyLatentImage"
      },
      "widgets_values": [
        512,
        512,
        1
      ]
    },
    {
      "id": 88,
      "type": "ImpactSwitch",
      "pos": [
        890.3735961914062,
        370.2314453125
      ],
      "size": [
        270,
        142
      ],
      "flags": {},
      "order": 15,
      "mode": 0,
      "inputs": [
        {
          "name": "input1",
          "shape": 7,
          "type": "*",
          "link": 129
        },
        {
          "name": "input2",
          "type": "LATENT",
          "link": 130
        },
        {
          "name": "input3",
          "type": "LATENT",
          "link": 132
        },
        {
          "name": "input4",
          "type": "LATENT",
          "link": null
        }
      ],
      "outputs": [
        {
          "label": "LATENT",
          "name": "selected_value",
          "type": "*",
          "links": [
            133
          ]
        },
        {
          "name": "selected_label",
          "type": "STRING",
          "links": null
        },
        {
          "name": "selected_index",
          "type": "INT",
          "links": null
        }
      ],
      "properties": {
        "cnr_id": "comfyui-impact-pack",
        "ver": "f86c5afc68958afb89bf66898d6b5038ce98a096",
        "Node name for S&R": "ImpactSwitch"
      },
      "widgets_values": [
        1,
        false
      ]
    },
    {
      "id": 84,
      "type": "StarFlowRatioLatentConstructor",
      "pos": [
        572.5165405273438,
        378.088623046875
      ],
      "size": [
        270,
        166
      ],
      "flags": {},
      "order": 7,
      "mode": 0,
      "inputs": [
        {
          "name": "batch_size",
          "type": "INT",
          "widget": {
            "name": "batch_size"
          },
          "link": 136
        }
      ],
      "outputs": [
        {
          "name": "latent",
          "type": "LATENT",
          "links": [
            129
          ]
        },
        {
          "name": "width",
          "type": "INT",
          "links": null
        },
        {
          "name": "height",
          "type": "INT",
          "links": null
        },
        {
          "name": "channels",
          "type": "INT",
          "links": null
        }
      ],
      "properties": {
        "Node name for S&R": "StarFlowRatioLatentConstructor"
      },
      "widgets_values": [
        "3:4",
        1,
        16
      ]
    },
    {
      "id": 82,
      "type": "SaveImage",
      "pos": [
        1480.199462890625,
        -90.35010528564453
      ],
      "size": [
        484.28564453125,
        537.4143676757812
      ],
      "flags": {},
      "order": 18,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 123
        }
      ],
      "outputs": [],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "SaveImage"
      },
      "widgets_values": [
        "ComfyUI"
      ]
    },
    {
      "id": 91,
      "type": "Int",
      "pos": [
        121.22533416748047,
        656.969482421875
      ],
      "size": [
        270,
        58
      ],
      "flags": {},
      "order": 2,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "INT",
          "type": "INT",
          "links": [
            136,
            137,
            138
          ]
        }
      ],
      "properties": {
        "cnr_id": "ComfyLiterals",
        "ver": "bdddb08ca82d90d75d97b1d437a652e0284a32ac",
        "Node name for S&R": "Int"
      },
      "widgets_values": [
        "2"
      ]
    },
    {
      "id": 70,
      "type": "NunchakuTextEncoderLoaderV2",
      "pos": [
        -130.00958251953125,
        311.11370849609375
      ],
      "size": [
        266.7509765625,
        136.2857208251953
      ],
      "flags": {},
      "order": 3,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "CLIP",
          "type": "CLIP",
          "links": [
            107
          ]
        }
      ],
      "properties": {
        "cnr_id": "ComfyUI-nunchaku",
        "ver": "9b6c0625cb0757496fbc7743f65cf12649d852ef",
        "Node name for S&R": "NunchakuTextEncoderLoaderV2",
        "aux_id": "nunchaku-tech/ComfyUI-nunchaku"
      },
      "widgets_values": [
        "flux.1",
        "clip_l.safetensors",
        "t5xxl_fp8_e4m3fn.safetensors",
        1024
      ]
    },
    {
      "id": 73,
      "type": "VAELoader",
      "pos": [
        -133.01913452148438,
        519.6016845703125
      ],
      "size": [
        270,
        58
      ],
      "flags": {},
      "order": 4,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "VAE",
          "type": "VAE",
          "links": [
            110
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "VAELoader"
      },
      "widgets_values": [
        "ae.safetensors"
      ]
    },
    {
      "id": 72,
      "type": "VAEDecode",
      "pos": [
        1286.4931640625,
        -119.40676879882812
      ],
      "size": [
        140,
        46
      ],
      "flags": {},
      "order": 17,
      "mode": 0,
      "inputs": [
        {
          "name": "samples",
          "type": "LATENT",
          "link": 109
        },
        {
          "name": "vae",
          "type": "VAE",
          "link": 110
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            123
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "VAEDecode"
      },
      "widgets_values": []
    },
    {
      "id": 90,
      "type": "EmptyLatentImage",
      "pos": [
        572.5165405273438,
        773.8029174804688
      ],
      "size": [
        270,
        106
      ],
      "flags": {},
      "order": 8,
      "mode": 0,
      "inputs": [
        {
          "name": "batch_size",
          "type": "INT",
          "widget": {
            "name": "batch_size"
          },
          "link": 138
        }
      ],
      "outputs": [
        {
          "name": "LATENT",
          "type": "LATENT",
          "links": [
            132
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "EmptyLatentImage"
      },
      "widgets_values": [
        1024,
        1232,
        1
      ]
    },
    {
      "id": 54,
      "type": "LayerUtility: ImageScaleByAspectRatio V2",
      "pos": [
        196.5135498046875,
        -340.6358337402344
      ],
      "size": [
        303.6851501464844,
        330
      ],
      "flags": {},
      "order": 10,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "shape": 7,
          "type": "IMAGE",
          "link": 72
        },
        {
          "name": "mask",
          "shape": 7,
          "type": "MASK",
          "link": null
        }
      ],
      "outputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "links": [
            101
          ]
        },
        {
          "name": "mask",
          "type": "MASK",
          "links": null
        },
        {
          "name": "original_size",
          "type": "BOX",
          "links": null
        },
        {
          "name": "width",
          "type": "INT",
          "links": [
            134
          ]
        },
        {
          "name": "height",
          "type": "INT",
          "links": [
            135
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfyui_layerstyle",
        "ver": "3bfe8e435d167b4a5bf08716729f89802dbbaa6f",
        "Node name for S&R": "LayerUtility: ImageScaleByAspectRatio V2"
      },
      "widgets_values": [
        "original",
        1,
        1,
        "letterbox",
        "lanczos",
        "8",
        "longest",
        1024,
        "#000000"
      ],
      "color": "rgba(38, 73, 116, 0.7)"
    },
    {
      "id": 65,
      "type": "NunchakuPuLIDLoaderV2",
      "pos": [
        567.7080078125,
        -260.4316101074219
      ],
      "size": [
        278.0703125,
        126
      ],
      "flags": {},
      "order": 11,
      "mode": 0,
      "inputs": [
        {
          "name": "model",
          "type": "MODEL",
          "link": 126
        }
      ],
      "outputs": [
        {
          "name": "MODEL",
          "type": "MODEL",
          "links": [
            100
          ]
        },
        {
          "name": "PULID_PIPELINE",
          "type": "PULID_PIPELINE",
          "links": [
            99
          ]
        }
      ],
      "properties": {
        "cnr_id": "ComfyUI-nunchaku",
        "ver": "9b6c0625cb0757496fbc7743f65cf12649d852ef",
        "Node name for S&R": "NunchakuPuLIDLoaderV2",
        "aux_id": "nunchaku-tech/ComfyUI-nunchaku"
      },
      "widgets_values": [
        "pulid_flux_v0.9.1.safetensors",
        "EVA02_CLIP_L_336_psz14_s6B.pt",
        "gpu"
      ]
    },
    {
      "id": 67,
      "type": "CLIPTextEncode",
      "pos": [
        601.0728759765625,
        -61.097694396972656
      ],
      "size": [
        400,
        200
      ],
      "flags": {},
      "order": 9,
      "mode": 0,
      "inputs": [
        {
          "name": "clip",
          "type": "CLIP",
          "link": 107
        },
        {
          "name": "text",
          "type": "STRING",
          "widget": {
            "name": "text"
          },
          "link": 121
        }
      ],
      "outputs": [
        {
          "name": "CONDITIONING",
          "type": "CONDITIONING",
          "links": [
            103,
            105
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "CLIPTextEncode"
      },
      "widgets_values": [
        "chibi style, a character stand here, the background is white and pure"
      ]
    },
    {
      "id": 46,
      "type": "LoadImage",
      "pos": [
        -116.68460845947266,
        -330.92724609375
      ],
      "size": [
        274.080078125,
        314
      ],
      "flags": {},
      "order": 5,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            72
          ]
        },
        {
          "name": "MASK",
          "type": "MASK",
          "links": null
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.49",
        "Node name for S&R": "LoadImage"
      },
      "widgets_values": [
        "下载.jpeg",
        "image"
      ]
    },
    {
      "id": 66,
      "type": "NunchakuFluxPuLIDApplyV2",
      "pos": [
        913.7849731445312,
        -360.912109375
      ],
      "size": [
        305.3404235839844,
        186
      ],
      "flags": {},
      "order": 14,
      "mode": 0,
      "inputs": [
        {
          "name": "model",
          "type": "MODEL",
          "link": 100
        },
        {
          "name": "pulid_pipline",
          "type": "PULID_PIPELINE",
          "link": 99
        },
        {
          "name": "image",
          "type": "IMAGE",
          "link": 101
        },
        {
          "name": "attn_mask",
          "shape": 7,
          "type": "MASK",
          "link": null
        },
        {
          "name": "options",
          "shape": 7,
          "type": "OPTIONS",
          "link": null
        }
      ],
      "outputs": [
        {
          "name": "MODEL",
          "type": "MODEL",
          "links": [
            102
          ]
        }
      ],
      "properties": {
        "cnr_id": "ComfyUI-nunchaku",
        "ver": "9b6c0625cb0757496fbc7743f65cf12649d852ef",
        "Node name for S&R": "NunchakuFluxPuLIDApplyV2",
        "aux_id": "nunchaku-tech/ComfyUI-nunchaku"
      },
      "widgets_values": [
        1,
        0,
        1
      ]
    },
    {
      "id": 63,
      "type": "KSampler",
      "pos": [
        1217.694580078125,
        41.484039306640625
      ],
      "size": [
        270,
        262
      ],
      "flags": {},
      "order": 16,
      "mode": 0,
      "inputs": [
        {
          "name": "model",
          "type": "MODEL",
          "link": 102
        },
        {
          "name": "positive",
          "type": "CONDITIONING",
          "link": 103
        },
        {
          "name": "negative",
          "type": "CONDITIONING",
          "link": 104
        },
        {
          "name": "latent_image",
          "type": "LATENT",
          "link": 133
        }
      ],
      "outputs": [
        {
          "name": "LATENT",
          "type": "LATENT",
          "links": [
            109
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "KSampler"
      },
      "widgets_values": [
        1013877930502019,
        "randomize",
        20,
        1,
        "euler",
        "simple",
        1
      ]
    }
  ],
  "links": [
    [
      72,
      46,
      0,
      54,
      0,
      "IMAGE"
    ],
    [
      99,
      65,
      1,
      66,
      1,
      "PULID_PIPELINE"
    ],
    [
      100,
      65,
      0,
      66,
      0,
      "MODEL"
    ],
    [
      101,
      54,
      0,
      66,
      2,
      "IMAGE"
    ],
    [
      102,
      66,
      0,
      63,
      0,
      "MODEL"
    ],
    [
      103,
      67,
      0,
      63,
      1,
      "CONDITIONING"
    ],
    [
      104,
      68,
      0,
      63,
      2,
      "CONDITIONING"
    ],
    [
      105,
      67,
      0,
      68,
      0,
      "CONDITIONING"
    ],
    [
      107,
      70,
      0,
      67,
      0,
      "CLIP"
    ],
    [
      109,
      63,
      0,
      72,
      0,
      "LATENT"
    ],
    [
      110,
      73,
      0,
      72,
      1,
      "VAE"
    ],
    [
      121,
      81,
      0,
      67,
      1,
      "STRING"
    ],
    [
      123,
      72,
      0,
      82,
      0,
      "IMAGE"
    ],
    [
      125,
      62,
      0,
      83,
      0,
      "MODEL"
    ],
    [
      126,
      83,
      0,
      65,
      0,
      "MODEL"
    ],
    [
      129,
      84,
      0,
      88,
      0,
      "*"
    ],
    [
      130,
      86,
      0,
      88,
      1,
      "LATENT"
    ],
    [
      132,
      90,
      0,
      88,
      2,
      "LATENT"
    ],
    [
      133,
      88,
      0,
      63,
      3,
      "LATENT"
    ],
    [
      134,
      54,
      3,
      86,
      0,
      "INT"
    ],
    [
      135,
      54,
      4,
      86,
      1,
      "INT"
    ],
    [
      136,
      91,
      0,
      84,
      0,
      "INT"
    ],
    [
      137,
      91,
      0,
      86,
      2,
      "INT"
    ],
    [
      138,
      91,
      0,
      90,
      0,
      "INT"
    ]
  ],
  "groups": [],
  "config": {},
  "extra": {
    "ds": {
      "scale": 1.771561000000001,
      "offset": [
        -564.5205384817389,
        698.3787575719946
      ]
    },
    "frontendVersion": "1.24.4",
    "VHS_latentpreview": false,
    "VHS_latentpreviewrate": 0,
    "VHS_MetadataImage": true,
    "VHS_KeepIntermediate": true
  },
  "version": 0.4
}
生成比例: 3:4
图像尺寸: 1152x1536px
潜在空间尺寸: 144x192
Latent张量形状: torch.Size([2, 16, 192, 144])
SELECTED: input1
Requested to load Flux
loaded completely 5377.634266113281 1786.84326171875 True
  0%|                                                                                                                                                           | 0/20 [00:00<?, ?it/s]python: /home/work/ssd1/ComfyUI_V/ComfyUI/nunchaku/src/interop/torch.cpp:46: at::Tensor to_torch(Tensor): Assertion `input.is_contiguous()' failed.

use the latest nightly wheel. e.g., https://github.com/nunchaku-tech/nunchaku/releases/tag/v1.0.1dev20250924

@Xingyu-Romantic

Copy link
Copy Markdown

i have a issue about "contiguous "我有一个关于“连续”的问题

{
  "id": "b06dfbd7-205e-453b-8f49-6b033edd7f96",
  "revision": 0,
  "last_node_id": 91,
  "last_link_id": 138,
  "nodes": [
    {
      "id": 68,
      "type": "ConditioningZeroOut",
      "pos": [
        721.7047729492188,
        287.5419616699219
      ],
      "size": [
        197.712890625,
        26
      ],
      "flags": {},
      "order": 12,
      "mode": 0,
      "inputs": [
        {
          "name": "conditioning",
          "type": "CONDITIONING",
          "link": 105
        }
      ],
      "outputs": [
        {
          "name": "CONDITIONING",
          "type": "CONDITIONING",
          "links": [
            104
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "ConditioningZeroOut"
      },
      "widgets_values": []
    },
    {
      "id": 62,
      "type": "NunchakuFluxDiTLoader",
      "pos": [
        -132.36669921875,
        51.04208755493164
      ],
      "size": [
        275.7613220214844,
        202
      ],
      "flags": {},
      "order": 0,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "MODEL",
          "type": "MODEL",
          "links": [
            125
          ]
        }
      ],
      "properties": {
        "cnr_id": "ComfyUI-nunchaku",
        "ver": "9b6c0625cb0757496fbc7743f65cf12649d852ef",
        "Node name for S&R": "NunchakuFluxDiTLoader",
        "aux_id": "nunchaku-tech/ComfyUI-nunchaku"
      },
      "widgets_values": [
        "svdq-int4_r32-flux.1-dev.safetensors",
        0,
        "nunchaku-fp16",
        "auto",
        0,
        "bfloat16",
        "enabled"
      ]
    },
    {
      "id": 81,
      "type": "PromptTextTranslation",
      "pos": [
        204.0387725830078,
        234.72515869140625
      ],
      "size": [
        310.8618469238281,
        198.81944274902344
      ],
      "flags": {},
      "order": 1,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "STRING",
          "type": "STRING",
          "links": [
            121
          ]
        }
      ],
      "properties": {
        "aux_id": "MofaAI/ComfyUI-Prompt-Translator",
        "ver": "cf31713673150e97f1ae835af0a95eb0133b5470",
        "Node name for S&R": "PromptTextTranslation"
      },
      "widgets_values": [
        "JKC,Irene,yabi,awj,This is a high-resolution,professional photograph of a young Asian woman with fair skin and delicate features. She has a slender build and is wearing a simple,white spaghetti-strap top that contrasts with her dark hair,which is pulled back and slightly tousled. Her large,almond-shaped brown eyes are the focal point of the image,framed by delicate,well-groomed eyebrows. Her lips are naturally pink and slightly parted,giving her a serene expression., She is holding a small,white lily with green leaves close to her face,with her left hand gently touching the petals. The background is a solid,deep black,which enhances the brightness and clarity of her complexion and the vividness of the flower. The lighting is soft and even,highlighting the smooth texture of her skin and the glossy surface of the flower petals., The overall mood of the photograph is calm and introspective,with a focus on the natural beauty of the subject and the delicate flower. The image is likely part of a high-fashion or fine art photography project,emphasizing minimalism and natural elegance",
        "",
        "enabled"
      ]
    },
    {
      "id": 83,
      "type": "ModelSamplingFlux",
      "pos": [
        218.9453887939453,
        43.088661193847656
      ],
      "size": [
        270,
        130
      ],
      "flags": {},
      "order": 6,
      "mode": 0,
      "inputs": [
        {
          "name": "model",
          "type": "MODEL",
          "link": 125
        }
      ],
      "outputs": [
        {
          "name": "MODEL",
          "type": "MODEL",
          "links": [
            126
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "ModelSamplingFlux"
      },
      "widgets_values": [
        1.15,
        0.5,
        1024,
        1024
      ]
    },
    {
      "id": 86,
      "type": "EmptyLatentImage",
      "pos": [
        573.2306518554688,
        607.3743896484375
      ],
      "size": [
        270,
        106
      ],
      "flags": {},
      "order": 13,
      "mode": 0,
      "inputs": [
        {
          "name": "width",
          "type": "INT",
          "widget": {
            "name": "width"
          },
          "link": 134
        },
        {
          "name": "height",
          "type": "INT",
          "widget": {
            "name": "height"
          },
          "link": 135
        },
        {
          "name": "batch_size",
          "type": "INT",
          "widget": {
            "name": "batch_size"
          },
          "link": 137
        }
      ],
      "outputs": [
        {
          "name": "LATENT",
          "type": "LATENT",
          "links": [
            130
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "EmptyLatentImage"
      },
      "widgets_values": [
        512,
        512,
        1
      ]
    },
    {
      "id": 88,
      "type": "ImpactSwitch",
      "pos": [
        890.3735961914062,
        370.2314453125
      ],
      "size": [
        270,
        142
      ],
      "flags": {},
      "order": 15,
      "mode": 0,
      "inputs": [
        {
          "name": "input1",
          "shape": 7,
          "type": "*",
          "link": 129
        },
        {
          "name": "input2",
          "type": "LATENT",
          "link": 130
        },
        {
          "name": "input3",
          "type": "LATENT",
          "link": 132
        },
        {
          "name": "input4",
          "type": "LATENT",
          "link": null
        }
      ],
      "outputs": [
        {
          "label": "LATENT",
          "name": "selected_value",
          "type": "*",
          "links": [
            133
          ]
        },
        {
          "name": "selected_label",
          "type": "STRING",
          "links": null
        },
        {
          "name": "selected_index",
          "type": "INT",
          "links": null
        }
      ],
      "properties": {
        "cnr_id": "comfyui-impact-pack",
        "ver": "f86c5afc68958afb89bf66898d6b5038ce98a096",
        "Node name for S&R": "ImpactSwitch"
      },
      "widgets_values": [
        1,
        false
      ]
    },
    {
      "id": 84,
      "type": "StarFlowRatioLatentConstructor",
      "pos": [
        572.5165405273438,
        378.088623046875
      ],
      "size": [
        270,
        166
      ],
      "flags": {},
      "order": 7,
      "mode": 0,
      "inputs": [
        {
          "name": "batch_size",
          "type": "INT",
          "widget": {
            "name": "batch_size"
          },
          "link": 136
        }
      ],
      "outputs": [
        {
          "name": "latent",
          "type": "LATENT",
          "links": [
            129
          ]
        },
        {
          "name": "width",
          "type": "INT",
          "links": null
        },
        {
          "name": "height",
          "type": "INT",
          "links": null
        },
        {
          "name": "channels",
          "type": "INT",
          "links": null
        }
      ],
      "properties": {
        "Node name for S&R": "StarFlowRatioLatentConstructor"
      },
      "widgets_values": [
        "3:4",
        1,
        16
      ]
    },
    {
      "id": 82,
      "type": "SaveImage",
      "pos": [
        1480.199462890625,
        -90.35010528564453
      ],
      "size": [
        484.28564453125,
        537.4143676757812
      ],
      "flags": {},
      "order": 18,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 123
        }
      ],
      "outputs": [],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "SaveImage"
      },
      "widgets_values": [
        "ComfyUI"
      ]
    },
    {
      "id": 91,
      "type": "Int",
      "pos": [
        121.22533416748047,
        656.969482421875
      ],
      "size": [
        270,
        58
      ],
      "flags": {},
      "order": 2,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "INT",
          "type": "INT",
          "links": [
            136,
            137,
            138
          ]
        }
      ],
      "properties": {
        "cnr_id": "ComfyLiterals",
        "ver": "bdddb08ca82d90d75d97b1d437a652e0284a32ac",
        "Node name for S&R": "Int"
      },
      "widgets_values": [
        "2"
      ]
    },
    {
      "id": 70,
      "type": "NunchakuTextEncoderLoaderV2",
      "pos": [
        -130.00958251953125,
        311.11370849609375
      ],
      "size": [
        266.7509765625,
        136.2857208251953
      ],
      "flags": {},
      "order": 3,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "CLIP",
          "type": "CLIP",
          "links": [
            107
          ]
        }
      ],
      "properties": {
        "cnr_id": "ComfyUI-nunchaku",
        "ver": "9b6c0625cb0757496fbc7743f65cf12649d852ef",
        "Node name for S&R": "NunchakuTextEncoderLoaderV2",
        "aux_id": "nunchaku-tech/ComfyUI-nunchaku"
      },
      "widgets_values": [
        "flux.1",
        "clip_l.safetensors",
        "t5xxl_fp8_e4m3fn.safetensors",
        1024
      ]
    },
    {
      "id": 73,
      "type": "VAELoader",
      "pos": [
        -133.01913452148438,
        519.6016845703125
      ],
      "size": [
        270,
        58
      ],
      "flags": {},
      "order": 4,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "VAE",
          "type": "VAE",
          "links": [
            110
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "VAELoader"
      },
      "widgets_values": [
        "ae.safetensors"
      ]
    },
    {
      "id": 72,
      "type": "VAEDecode",
      "pos": [
        1286.4931640625,
        -119.40676879882812
      ],
      "size": [
        140,
        46
      ],
      "flags": {},
      "order": 17,
      "mode": 0,
      "inputs": [
        {
          "name": "samples",
          "type": "LATENT",
          "link": 109
        },
        {
          "name": "vae",
          "type": "VAE",
          "link": 110
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            123
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "VAEDecode"
      },
      "widgets_values": []
    },
    {
      "id": 90,
      "type": "EmptyLatentImage",
      "pos": [
        572.5165405273438,
        773.8029174804688
      ],
      "size": [
        270,
        106
      ],
      "flags": {},
      "order": 8,
      "mode": 0,
      "inputs": [
        {
          "name": "batch_size",
          "type": "INT",
          "widget": {
            "name": "batch_size"
          },
          "link": 138
        }
      ],
      "outputs": [
        {
          "name": "LATENT",
          "type": "LATENT",
          "links": [
            132
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "EmptyLatentImage"
      },
      "widgets_values": [
        1024,
        1232,
        1
      ]
    },
    {
      "id": 54,
      "type": "LayerUtility: ImageScaleByAspectRatio V2",
      "pos": [
        196.5135498046875,
        -340.6358337402344
      ],
      "size": [
        303.6851501464844,
        330
      ],
      "flags": {},
      "order": 10,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "shape": 7,
          "type": "IMAGE",
          "link": 72
        },
        {
          "name": "mask",
          "shape": 7,
          "type": "MASK",
          "link": null
        }
      ],
      "outputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "links": [
            101
          ]
        },
        {
          "name": "mask",
          "type": "MASK",
          "links": null
        },
        {
          "name": "original_size",
          "type": "BOX",
          "links": null
        },
        {
          "name": "width",
          "type": "INT",
          "links": [
            134
          ]
        },
        {
          "name": "height",
          "type": "INT",
          "links": [
            135
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfyui_layerstyle",
        "ver": "3bfe8e435d167b4a5bf08716729f89802dbbaa6f",
        "Node name for S&R": "LayerUtility: ImageScaleByAspectRatio V2"
      },
      "widgets_values": [
        "original",
        1,
        1,
        "letterbox",
        "lanczos",
        "8",
        "longest",
        1024,
        "#000000"
      ],
      "color": "rgba(38, 73, 116, 0.7)"
    },
    {
      "id": 65,
      "type": "NunchakuPuLIDLoaderV2",
      "pos": [
        567.7080078125,
        -260.4316101074219
      ],
      "size": [
        278.0703125,
        126
      ],
      "flags": {},
      "order": 11,
      "mode": 0,
      "inputs": [
        {
          "name": "model",
          "type": "MODEL",
          "link": 126
        }
      ],
      "outputs": [
        {
          "name": "MODEL",
          "type": "MODEL",
          "links": [
            100
          ]
        },
        {
          "name": "PULID_PIPELINE",
          "type": "PULID_PIPELINE",
          "links": [
            99
          ]
        }
      ],
      "properties": {
        "cnr_id": "ComfyUI-nunchaku",
        "ver": "9b6c0625cb0757496fbc7743f65cf12649d852ef",
        "Node name for S&R": "NunchakuPuLIDLoaderV2",
        "aux_id": "nunchaku-tech/ComfyUI-nunchaku"
      },
      "widgets_values": [
        "pulid_flux_v0.9.1.safetensors",
        "EVA02_CLIP_L_336_psz14_s6B.pt",
        "gpu"
      ]
    },
    {
      "id": 67,
      "type": "CLIPTextEncode",
      "pos": [
        601.0728759765625,
        -61.097694396972656
      ],
      "size": [
        400,
        200
      ],
      "flags": {},
      "order": 9,
      "mode": 0,
      "inputs": [
        {
          "name": "clip",
          "type": "CLIP",
          "link": 107
        },
        {
          "name": "text",
          "type": "STRING",
          "widget": {
            "name": "text"
          },
          "link": 121
        }
      ],
      "outputs": [
        {
          "name": "CONDITIONING",
          "type": "CONDITIONING",
          "links": [
            103,
            105
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "CLIPTextEncode"
      },
      "widgets_values": [
        "chibi style, a character stand here, the background is white and pure"
      ]
    },
    {
      "id": 46,
      "type": "LoadImage",
      "pos": [
        -116.68460845947266,
        -330.92724609375
      ],
      "size": [
        274.080078125,
        314
      ],
      "flags": {},
      "order": 5,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            72
          ]
        },
        {
          "name": "MASK",
          "type": "MASK",
          "links": null
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.49",
        "Node name for S&R": "LoadImage"
      },
      "widgets_values": [
        "下载.jpeg",
        "image"
      ]
    },
    {
      "id": 66,
      "type": "NunchakuFluxPuLIDApplyV2",
      "pos": [
        913.7849731445312,
        -360.912109375
      ],
      "size": [
        305.3404235839844,
        186
      ],
      "flags": {},
      "order": 14,
      "mode": 0,
      "inputs": [
        {
          "name": "model",
          "type": "MODEL",
          "link": 100
        },
        {
          "name": "pulid_pipline",
          "type": "PULID_PIPELINE",
          "link": 99
        },
        {
          "name": "image",
          "type": "IMAGE",
          "link": 101
        },
        {
          "name": "attn_mask",
          "shape": 7,
          "type": "MASK",
          "link": null
        },
        {
          "name": "options",
          "shape": 7,
          "type": "OPTIONS",
          "link": null
        }
      ],
      "outputs": [
        {
          "name": "MODEL",
          "type": "MODEL",
          "links": [
            102
          ]
        }
      ],
      "properties": {
        "cnr_id": "ComfyUI-nunchaku",
        "ver": "9b6c0625cb0757496fbc7743f65cf12649d852ef",
        "Node name for S&R": "NunchakuFluxPuLIDApplyV2",
        "aux_id": "nunchaku-tech/ComfyUI-nunchaku"
      },
      "widgets_values": [
        1,
        0,
        1
      ]
    },
    {
      "id": 63,
      "type": "KSampler",
      "pos": [
        1217.694580078125,
        41.484039306640625
      ],
      "size": [
        270,
        262
      ],
      "flags": {},
      "order": 16,
      "mode": 0,
      "inputs": [
        {
          "name": "model",
          "type": "MODEL",
          "link": 102
        },
        {
          "name": "positive",
          "type": "CONDITIONING",
          "link": 103
        },
        {
          "name": "negative",
          "type": "CONDITIONING",
          "link": 104
        },
        {
          "name": "latent_image",
          "type": "LATENT",
          "link": 133
        }
      ],
      "outputs": [
        {
          "name": "LATENT",
          "type": "LATENT",
          "links": [
            109
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.3.52",
        "Node name for S&R": "KSampler"
      },
      "widgets_values": [
        1013877930502019,
        "randomize",
        20,
        1,
        "euler",
        "simple",
        1
      ]
    }
  ],
  "links": [
    [
      72,
      46,
      0,
      54,
      0,
      "IMAGE"
    ],
    [
      99,
      65,
      1,
      66,
      1,
      "PULID_PIPELINE"
    ],
    [
      100,
      65,
      0,
      66,
      0,
      "MODEL"
    ],
    [
      101,
      54,
      0,
      66,
      2,
      "IMAGE"
    ],
    [
      102,
      66,
      0,
      63,
      0,
      "MODEL"
    ],
    [
      103,
      67,
      0,
      63,
      1,
      "CONDITIONING"
    ],
    [
      104,
      68,
      0,
      63,
      2,
      "CONDITIONING"
    ],
    [
      105,
      67,
      0,
      68,
      0,
      "CONDITIONING"
    ],
    [
      107,
      70,
      0,
      67,
      0,
      "CLIP"
    ],
    [
      109,
      63,
      0,
      72,
      0,
      "LATENT"
    ],
    [
      110,
      73,
      0,
      72,
      1,
      "VAE"
    ],
    [
      121,
      81,
      0,
      67,
      1,
      "STRING"
    ],
    [
      123,
      72,
      0,
      82,
      0,
      "IMAGE"
    ],
    [
      125,
      62,
      0,
      83,
      0,
      "MODEL"
    ],
    [
      126,
      83,
      0,
      65,
      0,
      "MODEL"
    ],
    [
      129,
      84,
      0,
      88,
      0,
      "*"
    ],
    [
      130,
      86,
      0,
      88,
      1,
      "LATENT"
    ],
    [
      132,
      90,
      0,
      88,
      2,
      "LATENT"
    ],
    [
      133,
      88,
      0,
      63,
      3,
      "LATENT"
    ],
    [
      134,
      54,
      3,
      86,
      0,
      "INT"
    ],
    [
      135,
      54,
      4,
      86,
      1,
      "INT"
    ],
    [
      136,
      91,
      0,
      84,
      0,
      "INT"
    ],
    [
      137,
      91,
      0,
      86,
      2,
      "INT"
    ],
    [
      138,
      91,
      0,
      90,
      0,
      "INT"
    ]
  ],
  "groups": [],
  "config": {},
  "extra": {
    "ds": {
      "scale": 1.771561000000001,
      "offset": [
        -564.5205384817389,
        698.3787575719946
      ]
    },
    "frontendVersion": "1.24.4",
    "VHS_latentpreview": false,
    "VHS_latentpreviewrate": 0,
    "VHS_MetadataImage": true,
    "VHS_KeepIntermediate": true
  },
  "version": 0.4
}
生成比例: 3:4
图像尺寸: 1152x1536px
潜在空间尺寸: 144x192
Latent张量形状: torch.Size([2, 16, 192, 144])
SELECTED: input1
Requested to load Flux
loaded completely 5377.634266113281 1786.84326171875 True
  0%|                                                                                                                                                           | 0/20 [00:00<?, ?it/s]python: /home/work/ssd1/ComfyUI_V/ComfyUI/nunchaku/src/interop/torch.cpp:46: at::Tensor to_torch(Tensor): Assertion `input.is_contiguous()' failed.

use the latest nightly wheel. e.g., https://github.com/nunchaku-tech/nunchaku/releases/tag/v1.0.1dev20250924使用最新的 Nightly 版本。例如,https: //github.com/nunchaku-tech/nunchaku/releases/tag/v1.0.1dev20250924

still question

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] ksampler error

4 participants