Error occurred when executing KSampler

Viewing 5 reply threads
  • Author
    Posts
    • #11563
      AvatarArthur Wu
      Participant

        It is not possible to run workflow below:
        <h1 class=”entry-title”>AI Fashion idea generator (ComfyUI)</h1>
        Erro message follows below:

        Error occurred when executing KSampler: ‘NoneType’ object has no attribute ‘shape’ File “/Users/myuser/ComfyUI/execution.py”, line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/Users/myuser/ComfyUI/execution.py”, line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/Users/myuser/ComfyUI/execution.py”, line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/Users/myuser/ComfyUI/nodes.py”, line 1375, in sample return common_ksampler(model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/Users/myuser/ComfyUI/nodes.py”, line 1345, in common_ksampler samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/Users/myuser/ComfyUI/custom_nodes/ComfyUI-Impact-Pack/modules/impact/sample_error_enhancer.py”, line 9, in informative_sample return original_sample(*args, **kwargs) # This code helps interpret error messages that occur within exceptions but does not have any impact on other operations. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/Users/myuser/ComfyUI/comfy/sample.py”, line 100, in sample samples = sampler.sample(noise, positive_copy, negative_copy, 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) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/Users/myuser/ComfyUI/comfy/samplers.py”, line 712, in sample 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) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/Users/myuser/ComfyUI/comfy/samplers.py”, line 602, in sample positive = encode_model_conds(model.extra_conds, positive, noise, device, “positive”, latent_image=latent_image, denoise_mask=denoise_mask, seed=seed) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/Users/myuser/ComfyUI/comfy/samplers.py”, line 498, in encode_model_conds

      • #11575
        AvatarAndrew
        Keymaster

          Hi, I just tested the workflow. It is working correctly. You can
          – Updating your comfyui with comfyui manager: click “update all”
          – Make sure you have loaded the controlnet and checkpoint model.

        • #11578
          AvatarArthur Wu
          Participant

            Hi, Andrew.

            I have performed both steps above, but the error persisted. Then I have changed the checkpoint model, and it worked. The one set in the workflow did not work for some reason. Maybe I have downloaded a corrupted checkpoint file.

          • #11613
            AvatarArthur Wu
            Participant

              Hi, Andrew.

               Further investigating, I realized that there is some problem on my environment. See error message below.

              “[comfyui_controlnet_aux] | INFO -> Some nodes failed to load:

              Failed to import module dwpose because AssertionError: /Users/myuser/miniconda3/lib/python3.11/distutils/core.py

              Check that you properly installed the dependencies.

              If you think this is a bug, please report it on the github page (https://github.com/Fannovel16/comfyui_controlnet_aux/issues)”

              Additionally, it really does not work with model indicated on Tutorial. It only works with other model (like epicrealism), but it changes de face (not an Inpaiting).

              Furthermore: I noticed that the file of model indicated on workflow has .safetensors extension, but the link on tutorial reaches a .ckpt file. I am not sure it has any influence.

              Actions already done under the Manager menu: 

              1. Install Missing Custom Nodes.
              2. Update All.
              3. Update ComfyUI.
              4. Fetch Updates.

              Conclusions:

              1. It was possible to generated images with another checkpoint model, but it changes the face (not a real Inpainting).
              2. It was not possible to run the workflow due to error described on first message of this thread.
              3. File extension on tutorial does not match with the one in the workflow (for checkpoint model).

              Would you please point a direction to solve this ? 

              Thanks.

            • #11622
              AvatarAndrew
              Keymaster
                1. Yes, any SD 1.5 checkpoint models would work.
                2. ComfyUI manager may not upload all nodes correctly. In terminal, Go into custom_nodes folder and do a git pull in each folder.

                I see you are not using Windows. (Mac?)

                I don’t understand the error. The fashion generator doesn’t use DWPose. Was the error message from running the generator?

                1. Both ckpt and safetensors are OK.
              • #11664
                AvatarArthur Wu
                Participant

                  Hi,

                  1. About the models:

                  epicrealism_naturalSinRC1VAE.safetensors: workflow worked, but it changes the face.
                  Realistic_Vision_V5.1-inpainting.ckpt: workflow did not work. It shows error I’ve sent on first message of this thread.

                  1. I proceeded with all git pulls. Even after all of them, workflow indicated did not work.

                  I am running ComfyUI on a Mac M2 Pro.

                  You are right about error message on my previous post:  there is nothing to do with fashion generator. It is something related on initalization of server for ComfyUI.

                  Thanks.

                  • This reply was modified 9 months, 2 weeks ago by AvatarArthur Wu.
                  • #11763
                    AvatarAndrew
                    Keymaster

                      Hi Arthur,

                      I think what you see is the correct behavior.

                      1. The workflow uses a high denoising strength so it would change faces. Try not to mask the faces.
                      2. I should have mentioned that you should not use an inpainting model. It is not compatible with the workflow.

                       

                Viewing 5 reply threads
                • You must be logged in to reply to this topic.