Skip to content

quick fix for "KeyError: 'light'" (web/extensions/core/colorPalette.js updated causing error) #2

@Hapseleg

Description

@Hapseleg

if you get this error:

Traceback (most recent call last):
  File "D:\stable-diffusion\ComfyUI_windows_portable\ComfyUI\comfy_gallery.py", line 479, in <module>
    for key, value in COLORS['light']['colors']['node_slot'].items():
                      ~~~~~~^^^^^^^^^
KeyError: 'light'

heres a quick hack to fix it:
download the old colorPalette.js
https://github.com/comfyanonymous/ComfyUI/blob/3f5939add69c2a8fea2b892a46a48c2937dc4128/web/extensions/core/colorPalette.js

add
--comfyui-color-palette "PATH\TO\THE\FILE\colorPalette_old.js"
to your bat file, so for example
.\python_embeded\python.exe -s ComfyUI\comfy_gallery.py --comfyui-color-palette "c:\colorPalette_old.js"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions