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

The size of tensor a (3072) must match the size of tensor b (1612) #9

Open
xuhongming251 opened this issue Jan 22, 2025 · 7 comments
Open

Comments

@xuhongming251
Copy link

                  out = blocks_replace[("double_block", i)]({"img": img,                                            
                File "D:\ComfyUI\custom_nodes\ComfyUI_PuLID_Flux_ll\PulidFluxHook.py", line 74, in                  
              __call__                                                                                              
                  img = img + callback(temp_img,                                                                    
                File "D:\ComfyUI\custom_nodes\ComfyUI_PuLID_Flux_ll\PulidFluxHook.py", line 47, in                  
              pulid_patch                                                                                           
                  pulid_img = pulid_img * mask                                                                      
              RuntimeError: The size of tensor a (3072) must match the size of tensor b (1612) at                   
              non-singleton dimension 2                                                                             

Flux PuLID Face Swap .json

@tzhang27
Copy link

It seems that this code only supports a resolution of 1024x768.
Shape of pulid_img is always torch.Size([1, 4096, 3072])

Image

@lldacing
Copy link
Owner

lldacing commented Jan 22, 2025

It seems that this code only supports a resolution of 1024x768. Shape of pulid_img is always torch.Size([1, 4096, 3072])

Image

attn_mask只支持文生图,你想换原图中的某一个人脸,正常用局部重绘就行,不需要用attn_mask。图生图的这个报错我后面研究下

attn_mask only supports t2i. If you want to only change a person's face in the original picture, you can normally inpainting without using attn_mask. I'll check this error later.
@xuhongming251 @tzhang27

@lldacing
Copy link
Owner

Please update code. @xuhongming251 @tzhang27

@xuhongming251
Copy link
Author

Great, Perfect~!

@Amazon90
Copy link

Amazon90 commented Jan 22, 2025

Image

Image

@lldacing Changing to a resolution other than 1024x768 causes errors; please fix this issue.

@lldacing
Copy link
Owner

Image

Image

@lldacing Changing to a resolution other than 1024x768 causes errors; please fix this issue.

Did you update code?

@Amazon90
Copy link

Image
Image
@lldacing Changing to a resolution other than 1024x768 causes errors; please fix this issue.

Did you update code?

It's fixed now. Thank you!

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

4 participants