AttributeError: 'NoneType' object has no attribute 'keys' (updated, solved)

#11
by erle - opened

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

  • edit: git checkout xlabs_flux_controlnet, now it works
    1723126130.JPG

SAME!!!!!!
SCR-20240807-sce.png

Same question!

same q
update comfyui /adv controlnet useless

git checkout xlabs_flux_controlnet, now it works

In which directory is git?

In which directory is git?

ComfyUI_windows\ComfyUI\

still not working~

still not working~

Did you close the ComfyUI Command Prompt before executing the git checkout command? I made sure to close it before doing git checkout, then I ran Comfy again and it worked.

thanks. it works amazing.

git checkout xlabs_flux_controlnet, now it works

TY!

Thank you for all that replied... It's GLORIOUS!!!!!! It's alive, it's alive!!!!

Same, and my os is windows.
I use comfyui with 'ComfyUI_windows_portable', so I think that I can't switch branch to 'xlabs_flux_controlnet'.
The people that switch branch and run successfully should use linux os, so they can switch git branch.
I hope XLabs-AI can develop a comfyui plugin for us, it's better for current use way with git branch.

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

Not working in branch xlabs_flux_controlnet Comphy:

Error occurred when executing SamplerCustomAdvanced:

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]). Additional info: {'ph': 2, 'pw': 2}.
Shape mismatch, can't divide axis of length 147 in chunks of 2

File "i:\flux\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Not working in branch xlabs_flux_controlnet Comphy:

Error occurred when executing SamplerCustomAdvanced:

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]). Additional info: {'ph': 2, 'pw': 2}.
Shape mismatch, can't divide axis of length 147 in chunks of 2

File "i:\flux\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Its cause it ONLY accepts JPGs - i ran into this last night- none of my PNGs work and no wepb - you also can't just convert them either. No idea why - but anything that is natively a jpg works for me. everything else fails with that same error.

...

Its cause it ONLY accepts JPGs - i ran into this last night- none of my PNGs work and no wepb - you also can't just convert them either. No idea why - but anything that is natively a jpg works for me. everything else fails with that same error.

NO, Both PNG and webp are OK!
0808fluxtest_jumpcat(9).JPG

2024-08-11 002434.jpg

Not working in branch xlabs_flux_controlnet Comphy:

Error occurred when executing SamplerCustomAdvanced:

....

Maybe you didn't update comfyUI?

Same, and my os is windows.
I use comfyui with 'ComfyUI_windows_portable', so I think that I can't switch branch to 'xlabs_flux_controlnet'.
The people that switch branch and run successfully should use linux os, so they can switch git branch.
I hope XLabs-AI can develop a comfyui plugin for us, it's better for current use way with git branch.

You should enter "git checkout xlabs_flux_controlnet" in ComfyUI_windows\ComfyUI\

Not working in branch xlabs_flux_controlnet Comphy:

Error occurred when executing SamplerCustomAdvanced:

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]). Additional info: {'ph': 2, 'pw': 2}.
Shape mismatch, can't divide axis of length 147 in chunks of 2

File "i:\flux\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Maybe you didn't update comfyUI?

I wrote that this is in the branch xlabs_flux_controlnet branch, I tried also it in main branch.

Not working in branch xlabs_flux_controlnet Comphy:

Error occurred when executing SamplerCustomAdvanced:

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]). Additional info: {'ph': 2, 'pw': 2}.
Shape mismatch, can't divide axis of length 147 in chunks of 2

File "i:\flux\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Its cause it ONLY accepts JPGs - i ran into this last night- none of my PNGs work and no wepb - you also can't just convert them either. No idea why - but anything that is natively a jpg works for me. everything else fails with that same error.

I and load JPG.

Not working in branch xlabs_flux_controlnet Comphy:

Error occurred when executing SamplerCustomAdvanced:

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]). Additional info: {'ph': 2, 'pw': 2}.
Shape mismatch, can't divide axis of length 147 in chunks of 2

File "i:\flux\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Maybe you didn't update comfyUI?

I wrote that this is in the branch xlabs_flux_controlnet branch, I tried also it in main branch.

Not working in branch xlabs_flux_controlnet Comphy:

Error occurred when executing SamplerCustomAdvanced:

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]). Additional info: {'ph': 2, 'pw': 2}.
Shape mismatch, can't divide axis of length 147 in chunks of 2

File "i:\flux\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Its cause it ONLY accepts JPGs - i ran into this last night- none of my PNGs work and no wepb - you also can't just convert them either. No idea why - but anything that is natively a jpg works for me. everything else fails with that same error.

I and load JPG.

no idea - i know for me it still gives me this exact same error for anything that isn't JPG or directly generated and converted.

I'm still also really getting mostly very crappy generations whenever i use a control net. it either completely ignores it or is absolutely cursed.

bc8bf5342601efda4d6d08441bc69e9.png
试试这个,我就是这样解决的

  1. git checkout xlabs_flux_controlnet
  2. git branch --set-upstream-to=origin/xlabs_flux_controlnet xlabs_flux_controlnet
  3. git pull

Help

after this git checkout xlabs_flux_controlnet I now get the below ERROR on FluxGuidance, how to revert or fix pls :)

Error occurred when executing FluxGuidance:

'NoneType' object is not iterable

Edit: Scratch that rebooted Just started working :)

If you use Stability Matrix, you may need to install Git (if not done) and execute Git command (git checkout xlabs_flux_controlnet) in the Stability Matrix ComfyUI directory. This worked for me.

I managed to make it work, and stopped the error "object has no attribute 'keys'" just by removing the placeholder of negative prompt and adding a regular empty clip text.. It really guides the image, but the results are awful, very glitchy. They certainly are working on it, so we can have it more stable, and another models like Depth, HED, etc... I'm eager to see what these guys are producing, congrats for such amazing work!!!

erle changed discussion status to closed

2024-08-12 204314.png

erle changed discussion title from AttributeError: 'NoneType' object has no attribute 'keys' to AttributeError: 'NoneType' object has no attribute 'keys' (updated, solved)
erle changed discussion status to open

i use comfyui portable and when i run
git checkout xlabs_flux_controlnet
it show this error -> error: pathspec 'xlabs_flux_controlnet' did not match any file(s) known to git
i run that command inside c:\comfyui\comfyui folder
how to fix it ?

Sign up or log in to comment