WASasquatch / was-node-suite-comfyui

An extensive node suite for ComfyUI with over 210 new nodes
MIT License
1.15k stars 170 forks source link

ffmpeg_bin_path breaks loading of WAS nodes #63

Closed polarsky89 closed 1 year ago

polarsky89 commented 1 year ago

I've downloaded full ffmpeg package and pointed the 'bin' directrory in was_suite_config, also added it to Path. When the directory is present in config i get the error: WAS Node Suite Running At: C:\Grafika\AI_GEN\TOOLS\ComfyUI-master\custom_nodes\was-node-suite-comfyui\WAS_Node_Suite.py WAS Node Suite Running From: C:\Grafika\AI_GEN\TOOLS\ComfyUI-master\custom_nodes\was-node-suite-comfyui Invalid \escape: line 11 column 27 (char 723) Traceback (most recent call last): File "C:\Grafika\AI_GEN\TOOLS\ComfyUI-master\nodes.py", line 1269, in load_custom_node module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "C:\Grafika\AI_GEN\TOOLS\ComfyUI-master\custom_nodes\was-node-suite-comfyui__init.py", line 1, in from .WAS_Node_Suite import NODE_CLASS_MAPPINGS File "C:\Grafika\AI_GEN\TOOLS\ComfyUI-master\custom_nodes\was-node-suite-comfyui\WAS_Node_Suite.py", line 166, in if not wasconfig.contains(sett): AttributeError: 'bool' object has no attribute 'contains__'

Cannot import C:\Grafika\AI_GEN\TOOLS\ComfyUI-master\custom_nodes\was-node-suite-comfyui module for custom nodes: 'bool' object has no attribute 'contains' Starting server

To see the GUI go to: http://127.0.0.1:8188

As soon as I leave ffmpeg bin dir empty WAS nodes are loaded

WASasquatch commented 1 year ago

Looks like you're saving the file in the wrong encoding our making a syntax error.

Additionally, for windows paths, we need double backslashes because that is also an escape character, so we have to escape the escape character (lol)

Here is my file for example:

{
    "webui_styles": "E:\\python\automatic\\webui3\\stable-diffusion-webui\\styles.csv",
    "webui_styles_persistent_update": true,
    "blip_model_url": "https://storage.googleapis.com/sfr-vision-language-research/BLIP/models/model_base_capfilt_large.pth",
    "blip_model_vqa_url": "https://storage.googleapis.com/sfr-vision-language-research/BLIP/models/model_base_vqa_capfilt_large.pth",
    "history_display_limit": 32,
    "use_legacy_ascii_text": true,
    "sam_model_vith_url": "https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth",
    "sam_model_vitl_url": "https://dl.fbaipublicfiles.com/segment_anything/sam_vit_l_0b3195.pth",
    "sam_model_vitb_url": "https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth",
    "ffmpeg_bin_path": "E:\\ffmpeg\\bin"
}

Some encoding types also mess up files, like converting " to the tilted version, or not handling special characters that break out of strings.