Skip to content

from_single_file() support missing/incomplete for Ideogram4 and Krea2 transformers #14122

Description

@dxqb

Describe the bug

Neither Ideogram4Transformer2DModel nor Krea2Transformer2DModel currently support from_single_file(), though
for different reasons.

Ideogram4Transformer2DModel inherits FromOriginalModelMixin (since it was added in #13859), but it was never
added to SINGLE_FILE_LOADABLE_CLASSES in src/diffusers/loaders/single_file_model.py, and no
convert_ideogram4_transformer_checkpoint_to_diffusers-style mapping function exists in single_file_utils.py.
Calling from_single_file() on it currently raises unconditionally, since
_get_single_file_loadable_mapping_class() can only match classes that are registered in
SINGLE_FILE_LOADABLE_CLASSES:

For comparison, other recently added transformers (Cosmos, Flux2, ZImage, ...) both inherit the mixin and have a
checkpoint_mapping_fn registered.

Krea2Transformer2DModel doesn't inherit FromOriginalModelMixin at all, so from_single_file isn't even
defined on the class. This looks like it may simply be because there's no public checkpoint (original or
diffusers-format) to convert from yet — the docs mention loading "from a local directory produced by the Krea 2

Drafted by Claude, but confirmed, except the internals above

Reproduction

from diffusers import Ideogram4Transformer2DModel

Ideogram4Transformer2DModel.from_single_file("some/checkpoint.safetensors")
# ValueError: ...

Logs

System Info

cbdb637

Who can help?

Questions on single file checkpoints: @DN6

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions