Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No LoadPhotoMaker node #20

Open
Torcelllo opened this issue Jan 30, 2024 · 3 comments
Open

No LoadPhotoMaker node #20

Torcelllo opened this issue Jan 30, 2024 · 3 comments

Comments

@Torcelllo
Copy link

Torcelllo commented Jan 30, 2024

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
Copy link
Owner

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

@Torcelllo
Copy link
Author

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_data_all, 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.load_device),
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.call_impl(*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_tokens_mask)
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.call_impl(*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) + prompt_embeds
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.call_impl(*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 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.call_impl(*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.normalized_shape, 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
Copy link
Owner

Only SDXL models are supported at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants