Describe the bug
Flux models are sometimes distributed as transformer only, because all the other pipeline components are usually not changed.
Examples include:
Since support for Flux Fill was added here 862a7d5, diffusers.FluxTransformer2DModel.from_single_file fails to load these files:
File "/.../src/diffusers/src/diffusers/loaders/single_file_utils.py", line 598, in infer_diffusers_model_type
if checkpoint["img_in.weight"].shape[1] == 384:
~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'img_in.weight'
Reproduction
Download one of the example mentioned above, and run
from diffusers import FluxTransformer2DModel
transformer = FluxTransformer2DModel.from_single_file(your_file)
Logs
No response
System Info
HEAD
Who can help?
@DN6