ComfyUI_Patches_ll icon indicating copy to clipboard operation
ComfyUI_Patches_ll copied to clipboard

Fix Flux Kontext ReferenceLatent and ControlNet shape mismatch

Open fAIseh00d opened this issue 5 months ago • 0 comments

Summary

Allows to use Flux ControlNet with Flux Kontext ReferenceLatent


Description

Currently there's a shape mismatch in the forward_orig method due to conditioning concatentation for Flux Kontext.

Sources

Error image Kontext conditioning concat image

This PR introduces a fix that pads img with zeroes along the 1st dim to match the shape.

This change is local but potentially can cause issues if the input shapes mismatch due to different reason than kontext conditioing, e.g. due to some errors.


Example workflow to reproduce behaviour

FLUX_KONTEXT_REFERENCE_PR.json

workflow(361)

Links

ComfyUI Pull Request

fAIseh00d avatar Aug 05 '25 02:08 fAIseh00d