balazik / ComfyUI-PuLID-Flux

PuLID-Flux ComfyUI implementation
Apache License 2.0
426 stars 29 forks source link

AttributeError: 'PulidFluxModel' object has no attribute 'image_proj' #40

Open cocosoy opened 1 month ago

cocosoy commented 1 month ago

Loading PuLID-Flux model. !!! Exception during processing !!! 'PulidFluxModel' object has no attribute 'image_proj' Traceback (most recent call last): File "E:\ComfyUI\ComfyUI\execution.py", line 323, 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 "E:\ComfyUI\ComfyUI\execution.py", line 198, 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 "E:\ComfyUI\ComfyUI\execution.py", line 169, in _map_node_over_list process_inputs(input_dict, i) File "E:\ComfyUI\ComfyUI\execution.py", line 158, in process_inputs results.append(getattr(obj, func)(**inputs)) File "E:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-PuLID-Flux\pulidflux.py", line 178, in load_model model.from_pretrained(path=model_path) File "E:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-PuLID-Flux\pulidflux.py", line 57, in from_pretrained getattr(self, module).load_state_dict(state_dict_dict[module], strict=True) File "C:\Users\Jonathan\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1931, in getattr raise AttributeError( AttributeError: 'PulidFluxModel' object has no attribute 'image_proj'

Prompt executed in 27.00 seconds

cocosoy commented 1 month ago

Some additional info when starting ComfyUI, I'm not running the portable version so all my python stuff is in the system folder.

E:\ComfyUI\ComfyUI>python main.py [START] Security scan [DONE] Security scan

ComfyUI-Manager: installing dependencies done.

ComfyUI startup time: 2024-10-22 08:53:55.717073 Platform: Windows Python version: 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] Python executable: C:\Users\Jonathan\AppData\Local\Programs\Python\Python310\python.exe ComfyUI Path: E:\ComfyUI\ComfyUI Log path: E:\ComfyUI\ComfyUI\comfyui.log

Prestartup times for custom nodes: 0.9 seconds: E:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Manager

Total VRAM 24564 MB, total RAM 98045 MB pytorch version: 2.5.0+cu118 xformers version: 0.0.28.post1 Set vram state to: NORMAL_VRAM Device: cuda:0 NVIDIA GeForce RTX 4090 : cudaMallocAsync Using xformers cross attention [Prompt Server] web root: E:\ComfyUI\ComfyUI\web C:\Users\Jonathan\AppData\Local\Programs\Python\Python310\lib\site-packages\kornia\feature\lightglue.py:44: FutureWarning: torch.cuda.amp.custom_fwd(args...) is deprecated. Please use torch.amp.custom_fwd(args..., device_type='cuda') instead. @torch.cuda.amp.custom_fwd(cast_inputs=torch.float32)

Loading: ComfyUI-Manager (V2.51.8)

ComfyUI Revision: 2775 [f9f9fafa] | Released on '2024-10-20'

[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/model-list.json[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/alter-list.json [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/github-stats.json [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/extension-node-map.json C:\Users\Jonathan\AppData\Local\Programs\Python\Python310\lib\site-packages\timm\models\layers__init.py:48: FutureWarning: Importing from timm.models.layers is deprecated, please import via timm.layers warnings.warn(f"Importing from {name__} is deprecated, please import via timm.layers", FutureWarning) Nvidia APEX normalization not installed, using PyTorch LayerNorm E:\ComfyUI\ComfyUI ############################################ E:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-NAI-styler\CSV ############################################ [] ############################################

Import times for custom nodes: 0.0 seconds: E:\ComfyUI\ComfyUI\custom_nodes\websocket_image_save.py 0.0 seconds: E:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Universal-Styler 0.0 seconds: E:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Custom-Scripts 0.2 seconds: E:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Manager 0.3 seconds: E:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Fluxpromptenhancer 1.0 seconds: E:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-PuLID-Flux

Starting server

balazik commented 1 month ago

Hi, look at your Load PuLID Flux Model node, did you selected the correct pulid_file pulid_flux_v0.9.0.safetensors ? (not the ip_adapter pulid model for SDXL)