Skip to content

Error when using the Layer Diffuse (SDXL) option #1707

Description

@freelyn

What happened?

Error when using the Layer Diffuse (SDXL) option. I am using the recommended Nova Anime XL model.

Exception Details

Error message
{
  "prompt_id": "a541fc4e-c412-40fd-82b7-053bf433ebdc",
  "node_id": "Sampler",
  "node_type": "KSampler",
  "executed": [
    "LayerDiffuseApply_Base"
  ],
  "exception_message": "\u0027NoneType\u0027 object is not subscriptable\n",
  "exception_type": "TypeError",
  "traceback": [
    "  File \u0022D:\\StabilityMatrix\\Packages\\ComfyUI\\execution.py\u0022, line 545, in execute\n    output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)\n                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
    "  File \u0022D:\\StabilityMatrix\\Packages\\ComfyUI\\execution.py\u0022, line 344, in get_output_data\n    return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)\n                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
    "  File \u0022D:\\StabilityMatrix\\Packages\\ComfyUI\\execution.py\u0022, line 318, in _async_map_node_over_list\n    await process_inputs(input_dict, i)\n",
    "  File \u0022D:\\StabilityMatrix\\Packages\\ComfyUI\\execution.py\u0022, line 306, in process_inputs\n    result = f(**inputs)\n             ^^^^^^^^^^^\n",
    "  File \u0022D:\\StabilityMatrix\\Packages\\ComfyUI\\nodes.py\u0022, line 1607, in sample\n    return common_ksampler(model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
    "  File \u0022D:\\StabilityMatrix\\Packages\\ComfyUI\\nodes.py\u0022, line 1571, in common_ksampler\n    samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,\n              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
    "  File \u0022D:\\StabilityMatrix\\Packages\\ComfyUI\\comfy\\sample.py\u0022, line 74, in sample\n    samples = sampler.sample(noise, positive, negative, cfg=cfg, latent_image=latent_image, start_step=start_step, last_step=last_step, force_full_denoise=force_full_denoise, denoise_mask=noise_mask, sigmas=sigmas, callback=callback, disable_pbar=disable_pbar, seed=seed)\n              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
    "  File \u0022D:\\StabilityMatrix\\Packages\\ComfyUI\\comfy\\samplers.py\u0022, line 1461, in sample\n    return sample(self.model, noise, positive, negative, cfg, self.device, sampler, sigmas, self.model_options, latent_image=latent_image, denoise_mask=denoise_mask, callback=callback, disable_pbar=disable_pbar, seed=seed)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
    "  File \u0022D:\\StabilityMatrix\\Packages\\ComfyUI\\comfy\\samplers.py\u0022, line 1351, in sample\n    return cfg_guider.sample(noise, latent_image, sampler, sigmas, denoise_mask, callback, disable_pbar, seed)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
    "  File \u0022D:\\StabilityMatrix\\Packages\\ComfyUI\\comfy\\samplers.py\u0022, line 1333, in sample\n    output = executor.execute(noise, latent_image, sampler, sigmas, denoise_mask, callback, disable_pbar, seed, latent_shapes=latent_shapes)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
    "  File \u0022D:\\StabilityMatrix\\Packages\\ComfyUI\\comfy\\patcher_extension.py\u0022, line 113, in execute\n    return self.original(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
    "  File \u0022D:\\StabilityMatrix\\Packages\\ComfyUI\\comfy\\samplers.py\u0022, line 1239, in outer_sample\n    self.inner_model, self.conds, self.loaded_models = comfy.sampler_helpers.prepare_sampling(self.model_patcher, noise.shape, self.conds, self.model_options)\n                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
    "  File \u0022D:\\StabilityMatrix\\Packages\\ComfyUI\\comfy\\sampler_helpers.py\u0022, line 186, in prepare_sampling\n    return executor.execute(model, noise_shape, conds, model_options=model_options, force_full_load=force_full_load, force_offload=force_offload)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
    "  File \u0022D:\\StabilityMatrix\\Packages\\ComfyUI\\comfy\\patcher_extension.py\u0022, line 113, in execute\n    return self.original(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
    "  File \u0022D:\\StabilityMatrix\\Packages\\ComfyUI\\comfy\\sampler_helpers.py\u0022, line 201, in _prepare_sampling\n    comfy.model_management.load_models_gpu([model] \u002B models, memory_required=memory_required, minimum_memory_required=minimum_memory_required, force_full_load=force_full_load)\n",
    "  File \u0022D:\\StabilityMatrix\\Packages\\ComfyUI\\comfy\\model_management.py\u0022, line 996, in load_models_gpu\n    loaded_model.model_load(lowvram_model_memory, force_patch_weights=force_patch_weights)\n",
    "  File \u0022D:\\StabilityMatrix\\Packages\\ComfyUI\\comfy\\model_management.py\u0022, line 782, in model_load\n    self.model_use_more_vram(use_more_vram, force_patch_weights=force_patch_weights)\n",
    "  File \u0022D:\\StabilityMatrix\\Packages\\ComfyUI\\comfy\\model_management.py\u0022, line 810, in model_use_more_vram\n    return self.model.partially_load(self.device, extra_memory, force_patch_weights=force_patch_weights)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
    "  File \u0022D:\\StabilityMatrix\\Packages\\ComfyUI\\comfy\\model_patcher.py\u0022, line 2117, in partially_load\n    raise e\n",
    "  File \u0022D:\\StabilityMatrix\\Packages\\ComfyUI\\comfy\\model_patcher.py\u0022, line 2114, in partially_load\n    self.load(device_to, dirty=dirty)\n",
    "  File \u0022D:\\StabilityMatrix\\Packages\\ComfyUI\\comfy\\model_patcher.py\u0022, line 1952, in load\n    force_load_param(self, \u0022weight\u0022, device_to)\n",
    "  File \u0022D:\\StabilityMatrix\\Packages\\ComfyUI\\comfy\\model_patcher.py\u0022, line 1925, in force_load_param\n    self.patch_weight_to_device(key, device_to=device_to, force_cast=True)\n",
    "  File \u0022D:\\StabilityMatrix\\Packages\\ComfyUI\\comfy\\model_patcher.py\u0022, line 909, in patch_weight_to_device\n    out_weight = comfy.lora.calculate_weight(self.patches[key], temp_weight, key) if key in self.patches else temp_weight\n                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
    "  File \u0022D:\\StabilityMatrix\\Packages\\ComfyUI\\comfy\\lora.py\u0022, line 478, in calculate_weight\n    do_pad_weight = len(v) \u003E 1 and v[1][\u0027pad_weight\u0027]\n                                   ~~~~^^^^^^^^^^^^^^\n"
  ],
  "current_inputs": {
    "model": [
      "\u003Ccomfy.model_patcher.ModelPatcherDynamic object at 0x000002891AD11AF0\u003E"
    ],
    "seed": [
      272611925
    ],
    "steps": [
      30
    ],
    "cfg": [
      5.0
    ],
    "sampler_name": [
      "euler_ancestral"
    ],
    "scheduler": [
      "normal"
    ],
    "positive": [
      "[[tensor([[[-0.2406,  0.0682,  0.1726,  ..., -0.2268, -0.1191, -0.1754],\n         [-0.0548,  0.0326, -0.0570,  ...,  0.0806, -0.1218,  0.0525],\n         [-0.0175, -0.0357,  0.0161,  ...,  0.0357,  0.0912, -0.1596],\n         ...,\n         [ 0.0529, -0.0483,  0.0244,  ...,  0.1869,  0.1844,  0.0011],\n         [ 0.0531, -0.0412,  0.0235,  ..., -0.1291, -0.2738,  0.0749],\n         [ 0.0850, -0.0419,  0.0150,  ..., -0.3493, -0.0317,  0.0015]]]), {\u0027pooled_output\u0027: tensor([[ 0.0389, -0.1552, -0.1661,  ..., -0.1925, -0.2490, -0.4093]])}]]"
    ],
    "negative": [
      "[[tensor([[[-0.2406,  0.0682,  0.1726,  ..., -0.2268, -0.1191, -0.1754],\n         [-0.0348, -0.0016, -0.0048,  ..., -0.0652, -0.0239,  0.0362],\n         [-0.0287,  0.0015,  0.0305,  ..., -0.0628,  0.0032,  0.0762],\n         ...,\n         [ 0.0445, -0.0393,  0.0292,  ...,  0.0922,  0.2283, -0.0290],\n         [ 0.0446, -0.0322,  0.0282,  ..., -0.2159, -0.3682,  0.0533],\n         [ 0.0767, -0.0329,  0.0212,  ..., -0.4136, -0.0236, -0.0403]]]), {\u0027pooled_output\u0027: tensor([[ 0.0740, -0.4341,  0.0378,  ..., -0.3666, -0.6477, -0.3360]])}]]"
    ],
    "latent_image": [
      "{\u0027samples\u0027: tensor([[[[0., 0., 0.,  ..., 0., 0., 0.],\n          [0., 0., 0.,  ..., 0., 0., 0.],\n          [0., 0., 0.,  ..., 0., 0., 0.],\n          ...,\n          [0., 0., 0.,  ..., 0., 0., 0.],\n          [0., 0., 0.,  ..., 0., 0., 0.],\n          [0., 0., 0.,  ..., 0., 0., 0.]],\n\n         [[0., 0., 0.,  ..., 0., 0., 0.],\n          [0., 0., 0.,  ..., 0., 0., 0.],\n          [0., 0., 0.,  ..., 0., 0., 0.],\n          ...,\n          [0., 0., 0.,  ..., 0., 0., 0.],\n          [0., 0., 0.,  ..., 0., 0., 0.],\n          [0., 0., 0.,  ..., 0., 0., 0.]],\n\n         [[0., 0., 0.,  ..., 0., 0., 0.],\n          [0., 0., 0.,  ..., 0., 0., 0.],\n          [0., 0., 0.,  ..., 0., 0., 0.],\n          ...,\n          [0., 0., 0.,  ..., 0., 0., 0.],\n          [0., 0., 0.,  ..., 0., 0., 0.],\n          [0., 0., 0.,  ..., 0., 0., 0.]],\n\n         [[0., 0., 0.,  ..., 0., 0., 0.],\n          [0., 0., 0.,  ..., 0., 0., 0.],\n          [0., 0., 0.,  ..., 0., 0., 0.],\n          ...,\n          [0., 0., 0.,  ..., 0., 0., 0.],\n          [0., 0., 0.,  ..., 0., 0., 0.],\n          [0., 0., 0.,  ..., 0., 0., 0.]]]]), \u0027downscale_ratio_spacial\u0027: 8}"
    ],
    "denoise": [
      1.0
    ]
  },
  "current_outputs": [
    "CheckpointLoader_Base",
    "EmptyLatentImage",
    "Sampler",
    "NegativeCLIP_Base",
    "VAEDecode_1",
    "LayerDiffuseApply_Base",
    "SaveImage",
    "LayerDiffuseApply_Refiner",
    "CLIP_Skip_Base",
    "PositiveCLIP_Base",
    "LayerDiffuseDecode"
  ],
  "timestamp": 1786086443156
}

Version

v2.16.2

What Operating System are you using?

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcrashBugs involving the app crashing to desktop

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions