smthemex / ComfyUI_StoryDiffusion

You can using StoryDiffusion in ComfyUI
Apache License 2.0
144 stars 191 forks source link

更新到最新版本,后台有如下错误,是否影响 #59

Closed aadian closed 2 weeks ago

aadian commented 3 weeks ago

Mac的M2芯片

Adding extra search path controlnet /Users/kevin/dev/stable-diffusion-webui/models/ControlNet

Loading: ComfyUI-Manager (V2.50.2)

ComfyUI Revision: 2598 [8f60d093] | Released on '2024-08-22'

Traceback (most recent call last): File "/Users/kevin/dev/ComfyUI/nodes.py", line 1993, 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 "/Users/kevin/dev/ComfyUI/custom_nodes/ComfyUI_StoryDiffusion/init.py", line 2, in from .Storydiffusion_node import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS File "/Users/kevin/dev/ComfyUI/custom_nodes/ComfyUI_StoryDiffusion/Storydiffusion_node.py", line 28, in from .utils.insightface_package import FaceAnalysis2, analyze_faces File "/Users/kevin/dev/ComfyUI/custom_nodes/ComfyUI_StoryDiffusion/utils/insightface_package.py", line 3, in from insightface.app import FaceAnalysis File "/opt/homebrew/anaconda3/envs/sdwebui/lib/python3.10/site-packages/insightface/init.py", line 18, in from . import app File "/opt/homebrew/anaconda3/envs/sdwebui/lib/python3.10/site-packages/insightface/app/init.py", line 2, in from .mask_renderer import * File "/opt/homebrew/anaconda3/envs/sdwebui/lib/python3.10/site-packages/insightface/app/mask_renderer.py", line 8, in from ..thirdparty import face3d File "/opt/homebrew/anaconda3/envs/sdwebui/lib/python3.10/site-packages/insightface/thirdparty/face3d/init.py", line 3, in from . import mesh File "/opt/homebrew/anaconda3/envs/sdwebui/lib/python3.10/site-packages/insightface/thirdparty/face3d/mesh/init.py", line 9, in from .cython import mesh_core_cython ImportError: dlopen(/opt/homebrew/anaconda3/envs/sdwebui/lib/python3.10/site-packages/insightface/thirdparty/face3d/mesh/cython/mesh_core_cython.cpython-310-darwin.so, 0x0002): tried: '/opt/homebrew/anaconda3/envs/sdwebui/lib/python3.10/site-packages/insightface/thirdparty/face3d/mesh/cython/mesh_core_cython.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/anaconda3/envs/sdwebui/lib/python3.10/site-packages/insightface/thirdparty/face3d/mesh/cython/mesh_core_cython.cpython-310-darwin.so' (no such file), '/opt/homebrew/anaconda3/envs/sdwebui/lib/python3.10/site-packages/insightface/thirdparty/face3d/mesh/cython/mesh_core_cython.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))

Cannot import /Users/kevin/dev/ComfyUI/custom_nodes/ComfyUI_StoryDiffusion module for custom nodes: dlopen(/opt/homebrew/anaconda3/envs/sdwebui/lib/python3.10/site-packages/insightface/thirdparty/face3d/mesh/cython/mesh_core_cython.cpython-310-darwin.so, 0x0002): tried: '/opt/homebrew/anaconda3/envs/sdwebui/lib/python3.10/site-packages/insightface/thirdparty/face3d/mesh/cython/mesh_core_cython.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/anaconda3/envs/sdwebui/lib/python3.10/site-packages/insightface/thirdparty/face3d/mesh/cython/mesh_core_cython.cpython-310-darwin.so' (no such file), '/opt/homebrew/anaconda3/envs/sdwebui/lib/python3.10/site-packages/insightface/thirdparty/face3d/mesh/cython/mesh_core_cython.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))

smthemex commented 3 weeks ago

看报错是insightface的问题,这是photomaker V2引入的,有些代码只支持 'x86_64', 如果这个问题出来,你其他调用insightface的插件是否也报错了?最近comfyUI的前端有大变动,所以你这个问题,我迟点看看能否解决。

aadian commented 2 weeks ago

大佬再帮忙看下

下载了insightface的源代码,编译后替换了site-packages/insightface/thirdparty/face3d/mesh/cython/mesh_core_cython.cpython-310-darwin.so 文件,节点加载不报错了。运行的时候,遇到如下错误,

运行界面

image

错误信息: got prompt Fetching 17 files: 100%|█████████████████████████████████████████████████████████████████████████| 17/17 [00:00<00:00, 35848.75it/s] Loading pipeline components...: 0%| | 0/7 [00:00<?, ?it/s]Some weights of the model checkpoint were not used when initializing CLIPTextModel: ['text_model.embeddings.position_ids'] Some weights of the model checkpoint were not used when initializing CLIPTextModelWithProjection: ['text_model.embeddings.position_ids'] Loading pipeline components...: 100%|█████████████████████████████████████████████████████████████████| 7/7 [00:00<00:00, 17.50it/s] start_merge_step:4 100%|███████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:40<00:00, 2.03s/it] <class 'list'> 100%|███████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:42<00:00, 2.10s/it] <class 'list'> <class 'list'> start sampler dual prompt !!! Exception during processing !!! 'NoneType' object has no attribute 'lower' Traceback (most recent call last): File "/Users/kevin/dev/ComfyUI/execution.py", line 317, in execute output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) File "/Users/kevin/dev/ComfyUI/execution.py", line 192, in get_output_data return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) File "/Users/kevin/dev/ComfyUI/execution.py", line 169, in _map_node_over_list process_inputs(input_dict, i) File "/Users/kevin/dev/ComfyUI/execution.py", line 158, in process_inputs results.append(getattr(obj, func)(**inputs)) File "/Users/kevin/dev/ComfyUI/custom_nodes/ComfyUI_StoryDiffusion/Storydiffusion_node.py", line 1916, in story_sampler image_dual = msdiffusion_main(pipe, image_a, image_b, prompts_dual, width, height, steps, seed, File "/Users/kevin/dev/ComfyUI/custom_nodes/ComfyUI_StoryDiffusion/Storydiffusion_node.py", line 1267, in msdiffusion_main image_encoder=load(clip_vision) File "/Users/kevin/dev/ComfyUI/comfy/clip_vision.py", line 117, in load sd = load_torch_file(ckpt_path) File "/Users/kevin/dev/ComfyUI/comfy/utils.py", line 33, in load_torch_file if ckpt.lower().endswith(".safetensors") or ckpt.lower().endswith(".sft"): AttributeError: 'NoneType' object has no attribute 'lower'

Prompt executed in 102.38 seconds

aadian commented 2 weeks ago

看了英文的readme文档,是我的模型没有放对位置,现在双角色可以出图了。

另外文档中的 pclip_vision 是不是为 clip_vision

├── ComfyUI/models/ | ├──photomaker/ | ├── ms_adapter.bin | ├──pclip_vision/ | ├── clip_vision_g.safetensors(2.35G) or CLIP-ViT-bigG-14-laion2B-39B-b160k.safetensors(3.43G)

smthemex commented 2 weeks ago

看了英文的readme文档,是我的模型没有放对位置,现在双角色可以出图了。

另外文档中的 pclip_vision 是不是为 clip_vision

├── ComfyUI/models/ | ├──photomaker/ | ├── ms_adapter.bin | ├──pclip_vision/ | ├── clip_vision_g.safetensors(2.35G) or CLIP-ViT-bigG-14-laion2B-39B-b160k.safetensors(3.43G)

是,是错别字