🌐
GitHub
github.com › Mikubill › sd-webui-controlnet › issues › 110
Error: 'NoneType' object has no attribute 'shape' · Issue #110 · Mikubill/sd-webui-controlnet
February 16, 2023 - in txt2img tab have an error 'NoneType' object has no attribute 'shape' when try use control net with canny Error completing request Arguments: ('task(4xiu5obdiohh5gn)', 'a cat', '', [], 20, 0, False, False, 1, 1, 7, -1.0, -1.0, 0, 0, 0,...
Author   LexVolkov
🌐
Reddit
reddit.com › r/stablediffusion › attributeerror: 'nonetype' object has no attribute 'shape'
r/StableDiffusion on Reddit: AttributeError: 'NoneType' object has no attribute 'shape'
October 18, 2023 -

I used the ControlNet extension & the Realistic Vision checkpoint, and it keeps giving me this error, "AttributeError: 'NoneType' object has no attribute 'shape'" whenever I try to generate a image. Even not using them, I still get this error.

What is the issue and how can I fix it?

Edit: it turns out when trying to use ControlNet, I was matching one of the preprocessors with the wrong models.

🌐
GitHub
github.com › AUTOMATIC1111 › stable-diffusion-webui › issues › 13848
AttributeError: 'NoneType' object has no attribute 'shape' · Issue #13848 · AUTOMATIC1111/stable-diffusion-webui
November 4, 2023 - Select Canny in the ControlNet options(this will automatically setup the correct preprocessor and model: depth_midas - diffusers_xl_depth_full [2f51180b])
Author   StefSupertramp
🌐
GitHub
github.com › Mikubill › sd-webui-controlnet › discussions › 132
AttributeError: 'NoneType' object has no attribute 'shape' · Mikubill/sd-webui-controlnet · Discussion #132
I was using the extension fine on release, but after the last few updates, whenever I try to generate an image I getting this error: AttributeError: 'NoneType' object has no attribute 'shape' Wonde...
Author   Mikubill
🌐
Hugging Face
huggingface.co › XLabs-AI › flux-controlnet-canny › discussions › 11
XLabs-AI/flux-controlnet-canny · AttributeError: 'NoneType' object has no attribute 'keys' (updated, solved)
August 7, 2024 - I use comfyui with 'ComfyUI_windows_portable', so I think that I can't switch branch to 'xlabs_flux_controlnet'. i am also on portable version, and this command (git checkout xlabs_flux_controlnet) works for me ... Error while processing rearrange-reduction pattern "b c (h ph) (w pw) -> b (h w) (c ph pw)". Input tensor shape: torch.Size([1, 16, 196, 147]).
🌐
GitHub
github.com › comfyanonymous › ComfyUI › issues › 6590
NoneType' object has no attribute 'shape' problem · Issue #6590 · comfyanonymous/ComfyUI
January 24, 2025 - Your question This message keep showing when using any controlent node no matter what i do i try all suggested solutions like reinstall control net reinstall comfy change python version trying different models try set union control net t...
Author   nadainterior
🌐
GitHub
github.com › Mikubill › sd-webui-controlnet › issues › 1289
[Bug]: AttributeError: 'NoneType' object has no attribute 'to' · Issue #1289 · Mikubill/sd-webui-controlnet
May 15, 2023 - using mask as input Loading preprocessor: none preprocessor resolution = 512 0% 0/20 [00:00<?, ?it/s] Error completing request Arguments: ('task(hrwrk7q8kx6snti)', 'woman smiling', '', [], 20, 0, False, False, 1, 1, 7, -1.0, -1.0, 0, 0, 0, False, 512, 512, False, 0.7, 2, 'Latent', 0, 0, 0, [], 0, <controlnet.py.UiControlNetUnit object at 0x7f8f79f3a320>, False, False, 'positive', 'comma', 0, False, False, '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, 0, None, False, 50) {} Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/call_
Published   May 15, 2023
Author   claytonjr
🌐
Reddit
reddit.com › r/comfyui › ksampler 'nonetype' object has no attribute 'shape'
r/comfyui on Reddit: KSampler 'NoneType' object has no attribute 'shape'
February 27, 2025 -

hello people, I would like to ask what could cause this problem. everything be working and when I load a controlnet union sdxl it just doesn't work after I try to apply it, I tried many workflows online and all have the same issue. Any one would know what a possible solution for this?

I checked this in Change 'c_adm' to 'y' in ControlNet.get_control by Kosinkadink · Pull Request #1836 · comfyanonymous/ComfyUI but the whole y thing was not found.

thank you <3

Find elsewhere
🌐
Reddit
reddit.com › r/stablediffusion › error when trying to generate anything with control net
r/StableDiffusion on Reddit: Error when trying to generate anything with control net
February 28, 2023 -

I setup Control net according to the brilliantly simple sticky post on the subreddit front page. I must have either messed something up or this is a new problem. Everytime i try to generate something I get this error:

AttributeError: 'NoneType' object has no attribute 'convert'

Does anyone know where the issue might lie or where I should start trouble shooting?

I appreciate the help!

🌐
Stack Overflow
stackoverflow.com › questions › 48617050 › attributeerror-nonetype-object-has-no-attribute-shape-what-is-wrong-in-my-c
python - AttributeError: 'NoneType' object has no attribute 'shape' What is wrong in my code? - Stack Overflow
Do not, as you are doing now, ignore the error condition and allow the problem to propagate to later code, where you then have to figure out how index got to be None. If you had written even the most basic error handling, your question would be "why isn't cvv.imread() finding my image files?" rather than "why is Python complaining about a NoneType object?"
🌐
GitHub
github.com › lllyasviel › stable-diffusion-webui-forge › issues › 108
[Bug]: Contronet is giving issues when generating on txt2img, AttributeError: 'NoneType' object has no attribute 'shape' · Issue #108 · lllyasviel/stable-diffusion-webui-forge
February 7, 2024 - When genning an image in SDXL model, getting an error: AttributeError: 'NoneType' object has no attribute 'shape' Trying lineart realistic preprocessor with t2i-adapter_diffusers_xl_lineart · Some testing: Hiresfix off and controlnet balanced: Succesful image inference
Author   Dawgmastah
🌐
Bobby Hadz
bobbyhadz.com › blog › python-attributeerror-nonetype-object-has-no-attribute-shape
AttributeError: 'NoneType' object has no attribute 'shape' | bobbyhadz
April 8, 2024 - The Python AttributeError: 'NoneType' object has no attribute 'shape' occurs when we access the `shape` attribute on a `None` value.
🌐
GitHub
github.com › ltdrdata › ComfyUI-Impact-Pack › issues › 591
how to fix error NoneType' object has no attribute 'shape' · Issue #591 · ltdrdata/ComfyUI-Impact-Pack
May 7, 2024 - 0: 640x640 1 face, 17.0ms Speed: ... x 1.167757847226974 -> (727, 1024) Requested to load ControlNet Requested to load BaseModel Loading 2 new models 0%| | 0/20 [00:00<?, ?it/s] !!! Exception during processing!!! 'NoneType' object has no attribute 'shape' Traceback (most recent ...
Author   mcvnpro
🌐
Tawk
comflowy.tawk.help › article › modulelist-object-has-no-attribute-1
Comflowy Help Center | 'ModuleList' object has no attribute '1'
RuntimeError: linear(): input and weight.T shapes cannot be multiplied 'ModuleList' object has no attribute '1' 'NoneType' object has no attribute 'shape' ... This issue usually arises in workflows that utilize ControlNet.
🌐
Stable Diffusion Art
stable-diffusion-art.com › home › topics › tech support › error occurred when executing ksampler
Error occurred when executing KSampler - Stable Diffusion Art
February 8, 2024 - Error occurred when executing KSampler: 'NoneType' object has no attribute 'shape' File "/Users/myuser/ComfyUI/execution.py", line 152, in recursive_execute
🌐
Reddit
reddit.com › r/comfyui › controlnet suddenly not working (sdxl)
r/comfyui on Reddit: ControlNet suddenly not working (SDXL)
October 25, 2023 -

Middle of a paid project and my ControlNet seems to be throwing a wobbly with the KSampler. I've tried different Control and Sampler nodes.

The error I'm recieving is:

Error occurred when executing KSampler (WAS):

'NoneType' object has no attribute 'shape'

File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 153, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 83, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 76, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\was-node-suite-comfyui\WAS_Node_Suite.py", line 8818, in sample
return nodes.common_ksampler(model, seed['seed'], steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise)
File "D:\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1207, in common_ksampler
samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,
File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\sample_error_enhancer.py", line 9, in informative_sample
return original_sample(*args, **kwargs)
File "D:\ComfyUI_windows_portable\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 "D:\ComfyUI_windows_portable\ComfyUI\comfy\samplers.py", line 728, 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 "D:\ComfyUI_windows_portable\ComfyUI\comfy\samplers.py", line 633, in sample
samples = sampler.sample(model_wrap, sigmas, extra_args, callback, noise, latent_image, denoise_mask, disable_pbar)
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\samplers.py", line 589, in sample
samples = getattr(k_diffusion_sampling, "sample_{}".format(sampler_name))(model_k, noise, sigmas, extra_args=extra_args, callback=k_callback, disable=disable_pbar, **extra_options)
File "D:\ComfyUI_windows_portable\python_embeded\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\k_diffusion\sampling.py", line 137, in sample_euler
denoised = model(x, sigma_hat * s_in, **extra_args)
File "D:\ComfyUI_windows_portable\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "D:\ComfyUI_windows_portable\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\samplers.py", line 287, in forward
out = self.inner_model(x, sigma, cond=cond, uncond=uncond, cond_scale=cond_scale, model_options=model_options, seed=seed)
File "D:\ComfyUI_windows_portable\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "D:\ComfyUI_windows_portable\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\k_diffusion\external.py", line 129, in forward
eps = self.get_eps(input * c_in, self.sigma_to_t(sigma), **kwargs)
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\k_diffusion\external.py", line 155, in get_eps
return self.inner_model.apply_model(*args, **kwargs)
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\samplers.py", line 275, in apply_model
out = sampling_function(self.inner_model.apply_model, x, timestep, uncond, cond, cond_scale, model_options=model_options, seed=seed)
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\samplers.py", line 253, in sampling_function
cond, uncond = calc_cond_uncond_batch(model_function, cond, uncond, x, timestep, max_total_area, model_options)
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\samplers.py", line 206, in calc_cond_uncond_batch
c['control'] = control.get_control(input_x, timestep_, c, len(cond_or_uncond))
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\controlnet.py", line 162, in get_control
control = self.control_model(x=x_noisy.to(self.control_model.dtype), hint=self.cond_hint, timesteps=t, context=context.to(self.control_model.dtype), y=y)
File "D:\ComfyUI_windows_portable\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "D:\ComfyUI_windows_portable\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\cldm\cldm.py", line 289, in forward
assert y.shape[0] == x.shape[0]

As far as I'm aware I'm up to date on everything.

Any ideas on how to resolve would be greatly appreciated.