Acly / comfyui-inpaint-nodes

Nodes for better inpainting with ComfyUI: Fooocus inpaint model for SDXL, LaMa, MAT, and various other tools for pre-filling inpaint & outpaint areas.
GNU General Public License v3.0
610 stars 42 forks source link

Fix calculate_weight_patched to handle variable-length patches #74

Closed TantanLight closed 1 month ago

TantanLight commented 1 month ago

updates the calculate_weight_patched function to handle patches with varying numbers of elements. It now safely unpacks patch data, skips invalid patches, and maintains compatibility with both Fooocus and standard patches. This change resolves the 'too many values to unpack' error

TantanLight commented 1 month ago

I was using an old version - and the bug is fixed in a more elegant way .