shiimizu / ComfyUI-PhotoMaker-Plus

PhotoMaker for ComfyUI
GNU General Public License v3.0
149 stars 14 forks source link

No LoadPhotoMaker node #20

Open Torcelllo opened 5 months ago

Torcelllo commented 5 months ago

In my Photomaker Node, there are only 2 menu items - the LoadPhotoMaker option is not available. Reinstalled twice (the SMZ version). Photomaker Encode and Apply Photomaker Style are OK, as is Prepare Images For ClipVision From Path. Win 10.

PhotoMaker-1

shiimizu commented 5 months ago

There's a built-in one in ComfyUI. _for_testing -> photomaker -> PhotoMakerLoader

Torcelllo commented 5 months ago

Oops!!! ERROR

Error occurred when executing PhotoMakerEncodePlus:

Given normalized_shape=[4096], expected input with shape [*, 4096], but got input of size[7, 2816]

File "B:\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "B:\ComfyUI\execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "B:\ComfyUI\custom_nodes\ComfyUI-0246\utils.py", line 373, in new_func res_value = old_func(final_args, kwargs) File "B:\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(slice_dict(input_dataall, i))) File "C:\Users\john\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(args, kwargs) File "B:\ComfyUI\custom_nodes\ComfyUI-PhotoMaker-SMZ\photomaker.py", line 138, in apply_photomaker cond = photomaker(id_pixel_values=pixel_values.unsqueeze(0), prompt_embeds=cond.to(photomaker.loaddevice), File "C:\Users\john\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl return self._callimpl(*args, **kwargs) File "C:\Users\john\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl return forward_call(*args, kwargs) File "B:\ComfyUI\comfy_extras\nodes_photomaker.py", line 113, in forward updated_prompt_embeds = self.fuse_module(prompt_embeds, id_embeds, class_tokensmask) File "C:\Users\john\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl return self._callimpl(*args, **kwargs) File "C:\Users\john\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl return forward_call(*args, kwargs) File "B:\ComfyUI\comfy_extras\nodes_photomaker.py", line 85, in forward stacked_id_embeds = self.fuse_fn(image_token_embeds, valid_id_embeds) File "B:\ComfyUI\comfy_extras\nodes_photomaker.py", line 52, in fuse_fn stacked_id_embeds = self.mlp1(stacked_id_embeds) + promptembeds File "C:\Users\john\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl return self._callimpl(*args, **kwargs) File "C:\Users\john\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl return forward_call(*args, kwargs) File "B:\ComfyUI\comfy_extras\nodesphotomaker.py", line 34, in forward x = self.layernorm(x) File "C:\Users\john\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl return self._callimpl(*args, **kwargs) File "C:\Users\john\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl return forward_call(*args, *kwargs) File "B:\ComfyUI\comfy\ops.py", line 86, in forward return self.forward_comfy_cast_weights(args, **kwargs) File "B:\ComfyUI\comfy\ops.py", line 82, in forward_comfy_cast_weights return torch.nn.functional.layer_norm(input, self.normalizedshape, weight, bias, self.eps) File "C:\Users\john\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\functional.py", line 2543, in layer_norm return torch.layer_norm(input, normalized_shape, weight, bias, eps, torch.backends.cudnn.enabled)

RTX 2070 8Gb VRAM, Win 10

shiimizu commented 5 months ago

Only SDXL models are supported at the moment.