when add ”num_images_per_prompt“ to batch generate pictures in gradio_demo/app.py, it occurs:
File "/home/gennexuslabs/data/service/ai/InstantIDAPI/./pipeline_stable_diffusion_xl_instantid_full.py", line 1040, in call
encoder_hidden_states = torch.cat([prompt_embeds, prompt_image_emb], dim=1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 2 but got size 8 for tensor number 1 in the list.
Solve:
Reason:
In the "pipeline_stable_diffusion_xl_instantid_full.py" file,
The encoding step may need "num_images_per_prompt" as the parameters also.
Problems descriptions:
when add ”num_images_per_prompt“ to batch generate pictures in gradio_demo/app.py, it occurs: File "/home/gennexuslabs/data/service/ai/InstantIDAPI/./pipeline_stable_diffusion_xl_instantid_full.py", line 1040, in call encoder_hidden_states = torch.cat([prompt_embeds, prompt_image_emb], dim=1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 2 but got size 8 for tensor number 1 in the list.
Solve:
Reason:
In the "pipeline_stable_diffusion_xl_instantid_full.py" file, The encoding step may need "num_images_per_prompt" as the parameters also.