smthemex / ComfyUI_StoryDiffusion

You can using StoryDiffusion in ComfyUI
Apache License 2.0
228 stars 194 forks source link

2个角色图生图遇到 Invalid `original_config_file` provided #38

Closed aadian closed 1 month ago

aadian commented 3 months ago

comfyui的节点配置如下: error

后台的错误信息如下: Prompt executed in 101.42 seconds got prompt Fetching 17 files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 17/17 [00:00<00:00, 40861.41it/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'] Loading pipeline components...: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:00<00:00, 13.33it/s] Loading PhotoMaker components [1] id_encoder from [/Users/kevin/dev/ComfyUI/models/photomaker/photomaker-v1.bin]... Loading PhotoMaker components [2] lora_weights from [/Users/kevin/dev/ComfyUI/models/photomaker/photomaker-v1.bin] start_merge_step:4 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:43<00:00, 2.15s/it] 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:45<00:00, 2.25s/it] !!! Exception during processing!!! Invalid original_config_file provided. Please set it to a valid file path or URL. Traceback (most recent call last): File "/Users/kevin/dev/ComfyUI/execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "/Users/kevin/dev/ComfyUI/execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "/Users/kevin/dev/ComfyUI/execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(*slice_dict(input_data_all, i))) File "/Users/kevin/dev/ComfyUI/custom_nodes/ComfyUI_StoryDiffusion/Storydiffusion_node.py", line 1424, 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 940, in msdiffusion_main pipe = StableDiffusionXLControlNetPipeline.from_single_file( File "/opt/homebrew/anaconda3/envs/sdwebui/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn return fn(args, **kwargs) File "/opt/homebrew/anaconda3/envs/sdwebui/lib/python3.10/site-packages/diffusers/loaders/single_file.py", line 377, in from_single_file original_config = fetch_original_config(original_config, local_files_only=local_files_only) File "/opt/homebrew/anaconda3/envs/sdwebui/lib/python3.10/site-packages/diffusers/loaders/single_file_utils.py", line 358, in fetch_original_config raise ValueError("Invalid original_config_file provided. Please set it to a valid file path or URL.") ValueError: Invalid original_config_file provided. Please set it to a valid file path or URL.

Prompt executed in 122.53 seconds

smthemex commented 3 months ago

diffuser版本不兼容 我设置的是0.28以上采用config_file,低于0.28的采用original_config_file,而你这里提示,可能是original_config_file文件加载失败。我回头检查一下代码。

aadian commented 3 months ago

好的大佬,有时间的时候帮忙看下,我检查一下版本diffusers版本是0.29.2,是不是和模型路径或者下错了模型

Python 3.10.6 (main, Oct 24 2022, 11:04:07) [Clang 12.0.0 ] on darwin Type "help", "copyright", "credits" or "license" for more information.

import diffusers print(diffusers.version) 0.29.2

canny

smthemex commented 3 months ago

发现问题了,你用的是苹果系统,我修改一下路径定义吧。

aadian commented 3 months ago

好的,谢大佬

aadian commented 3 months ago

好的,看到更新的代码了,重新拉了下代码,报同样的错误,打印了路径,找的是ComfyUI下的config目录: original_config_file:/Users/kevin/dev/ComfyUI/config/sd_xl_base.yaml

改了下,貌似不报错了,但是生成图片的时候,双角色是黑色的,还有什么要注意的么 original_config_file=os.path.join(cur_path,'custom_nodes/ComfyUI_StoryDiffusion/config', 'sd_xl_base.yaml') WechatIMG675

smthemex commented 3 months ago

双人的可能还是路径的问题,没有提取到特征图,我再改改吧

aadian commented 3 months ago

拉了新代码,还有点点问题,大佬再帮忙看下

!!! Exception during processing!!! 'PosixPath' object has no attribute 'decode' Traceback (most recent call last): File "/Users/kevin/dev/ComfyUI/execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "/Users/kevin/dev/ComfyUI/execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "/Users/kevin/dev/ComfyUI/execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(*slice_dict(input_data_all, i))) File "/Users/kevin/dev/ComfyUI/custom_nodes/ComfyUI_StoryDiffusion/Storydiffusion_node.py", line 1425, 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 941, in msdiffusion_main pipe = StableDiffusionXLControlNetPipeline.from_single_file( File "/opt/homebrew/anaconda3/envs/sdwebui/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn return fn(args, **kwargs) File "/opt/homebrew/anaconda3/envs/sdwebui/lib/python3.10/site-packages/diffusers/loaders/single_file.py", line 377, in from_single_file original_config = fetch_original_config(original_config, local_files_only=local_files_only) File "/opt/homebrew/anaconda3/envs/sdwebui/lib/python3.10/site-packages/diffusers/loaders/single_file_utils.py", line 348, in fetch_original_config elif is_valid_url(original_config_file): File "/opt/homebrew/anaconda3/envs/sdwebui/lib/python3.10/site-packages/diffusers/loaders/single_file_utils.py", line 269, in is_valid_url result = urlparse(url) File "/opt/homebrew/anaconda3/envs/sdwebui/lib/python3.10/urllib/parse.py", line 392, in urlparse url, scheme, _coerce_result = _coerce_args(url, scheme) File "/opt/homebrew/anaconda3/envs/sdwebui/lib/python3.10/urllib/parse.py", line 128, in _coerce_args return _decode_args(args) + (_encode_result,) File "/opt/homebrew/anaconda3/envs/sdwebui/lib/python3.10/urllib/parse.py", line 112, in _decode_args return tuple(x.decode(encoding, errors) if x else '' for x in args) File "/opt/homebrew/anaconda3/envs/sdwebui/lib/python3.10/urllib/parse.py", line 112, in return tuple(x.decode(encoding, errors) if x else '' for x in args) AttributeError: 'PosixPath' object has no attribute 'decode'

Prompt executed in 126.40 seconds

smthemex commented 3 months ago

好吧,一如以往的不识别,还是改回用原方法吧