sipie800 / ComfyUI-PuLID-Flux-Enhanced

Apache License 2.0
79 stars 13 forks source link

TypeError: typed_dict_schema() got an unexpected keyword argument 'cls' #3

Closed keno-log closed 1 month ago

keno-log commented 1 month ago

Please help on below issue:

File "E:\ComfyUI_240819\ComfyUI\custom_nodes\ComfyUI-PuLID-Flux-Enhanced__init.py", line 1, in from .pulidflux import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS File "E:\ComfyUI_240819\ComfyUI\custom_nodes\ComfyUI-PuLID-Flux-Enhanced\pulidflux.py", line 11, in from insightface.app import FaceAnalysis File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\insightface__init.py", line 18, in from . import app File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\insightface\app__init.py", line 2, in from .mask_renderer import File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\insightface\app\mask_renderer.py", line 4, in import albumentations as A File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\albumentations__init__.py", line 6, in from .augmentations import File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\albumentations\augmentations__init__.py", line 22, in from .transforms import * File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\albumentations\augmentations\transforms.py", line 2174, in class Downscale(ImageOnlyTransform): File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\albumentations\augmentations\transforms.py", line 2198, in Downscale class InitSchema(BaseTransformInitSchema): File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\pydantic_internal_model_construction.py", line 224, in new__ complete_model_class( File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\pydantic_internal_model_construction.py", line 573, in complete_model_class schema = cls.get_pydantic_core_schema(cls, handler) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\pydantic\main.py", line 668, in get_pydantic_core_schema__ return handler(source) ^^^^^^^^^^^^^^^ File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\pydantic_internal_schema_generation_shared.py", line 83, in call schema = self._handler(source_type) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\pydantic_internal_generate_schema.py", line 655, in generate_schema schema = self._generate_schema_inner(obj) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\pydantic_internal_generate_schema.py", line 924, in _generate_schema_inner return self._model_schema(obj) ^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\pydantic_internal_generate_schema.py", line 739, in _model_schema {k: self._generate_md_field_schema(k, v, decorators) for k, v in fields.items()}, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\pydantic_internal_generate_schema.py", line 739, in {k: self._generate_md_field_schema(k, v, decorators) for k, v in fields.items()}, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\pydantic_internal_generate_schema.py", line 1115, in _generate_md_field_schema common_field = self._common_field_schema(name, field_info, decorators) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\pydantic_internal_generate_schema.py", line 1308, in _common_field_schema schema = self._apply_annotations( ^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\pydantic_internal_generate_schema.py", line 2107, in _apply_annotations schema = get_inner_schema(source_type) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\pydantic_internal_schema_generation_shared.py", line 83, in call__ schema = self._handler(source_type) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\pydantic_internal_generate_schema.py", line 2088, in inner_handler schema = self._generate_schema_inner(obj) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\pydantic_internal_generate_schema.py", line 929, in _generate_schema_inner return self.match_type(obj) ^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\pydantic_internal_generate_schema.py", line 1029, in match_type return self._match_generic_type(obj, origin) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\pydantic_internal_generate_schema.py", line 1058, in _match_generic_type return self._union_schema(obj) ^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\pydantic_internal_generate_schema.py", line 1378, in _union_schema choices.append(self.generate_schema(arg)) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\pydantic_internal_generate_schema.py", line 655, in generate_schema schema = self._generate_schema_inner(obj) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\pydantic_internal_generate_schema.py", line 929, in _generate_schema_inner return self.match_type(obj) ^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\pydantic_internal_generate_schema.py", line 999, in match_type return self._typed_dict_schema(obj, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI_240819\python_embeded\Lib\site-packages\pydantic_internal_generate_schema.py", line 1520, in _typed_dict_schema td_schema = core_schema.typed_dict_schema( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: typed_dict_schema() got an unexpected keyword argument 'cls'

sipie800 commented 1 month ago

this is not an issue due to my adaptaion. however from my experience, you've got the version issue, most likely with pydantic. you may try install other version of pydantic in your comfy embeded python enviroment. if you don't know about how to install a python package in embeded python, just chatgpt it.

keno-log commented 1 month ago

Thank you so much! I upgrade pydantic to 2.9.2 and it worked.