[Bug]: When the resolution is not 1024x1024, an error message is displayed.
What happened?
When the input image resolution is not 1024x1024 at node layerDiffusionDiffApply, an error message is displayed.
, use nodes to change the resolution by upscalelatent,the first error pass,but comming nex one,node layerDiffuseDecode report
The resolution that reported an error is 1366x768.
I checked to make sure the resolutions match, but only 1024x1024 resolution works fine.
Steps to reproduce the problem
/
What should have happened?
/
Commit where the problem happens
ComfyUI: ComfyUI-layerdiffuse:
Sysinfo
Error occurred when executing LayeredDiffusionDiffApply:
Sizes of tensors must match except in dimension 1. Expected size 170 but got size 171 for tensor number 1 in the list.
File "H:\diffusion\lcm\ComfyUI\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all)
File "H:\diffusion\lcm\ComfyUI\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 "H:\diffusion\lcm\ComfyUI\ComfyUI\execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "H:\diffusion\lcm\ComfyUI\ComfyUI\custom_nodes\ComfyUI-layerdiffusion\layered_diffusion.py", line 392, in apply_layered_diffusion
torch.cat([latent["samples"], blended_latent["samples"]], dim=1)
Console logs
/
Workflow json file
/
Additional information
No response
Stable diffusion makes 8x compression from pixel space to latent space. So the input image's dimensions need to be multiple of 8. 8 x 170 = 1360.
I will add an explicit error message to make this clear.
Explicit error message added in https://github.com/huchenlei/ComfyUI-layerdiffuse/commit/74aee185528d76e41486400145596314aac1b957