Repository navigation
Conversation
zhihengy
changed the base branch from
chore/bump-diffusers-0.43
to
fsdp/denoising-step-index-to-forward
November 17, 2026 23:26
… checkpoint's modular index MiniMax-H3-Image keeps its Diffusers DiT in `transformer_diffusers/`, declared only in `modular_model_index.json`; its root `model_index.json` names the engine's native class in `transformer/`. The backend read only the root index and used the component's name as the folder. It now reads the modular index when the checkpoint ships one, as diffusers' modular loader does, and takes the folder from the component's loading spec. Weights still come from the checkpoint the run names, not from the repository a loading spec names.
…modular index A classic checkpoint's cache never holds modular_model_index.json, so the probe has no cached copy to fall back to. Offline it already read as absent, but a gated repo without a token or a stale token raised, and a mistyped local path surfaced as a repo-id error: loads that worked before the probe failed at trainer start. All three now fall through to the root index, which loads from the cache or gives diffusers' own error. The class error names the index it read, so a root-index read of a partially cached modular checkpoint is visible.
…loading note with load_component
zhihengy
force-pushed
the
h3-image/01-loader
branch
from
November 18, 2026 06:30
1f6690e to
231023c
Compare
… error found A probe the Hub could not answer (offline, gated, not a repo id) fell through to `model_index.json` without a trace, and the class error that follows for a checkpoint whose root index names another layout blamed remote code. The fall-through is logged with its cause, a 404 stays silent, the class error says the installed library does not provide the class, and the missing-subfolder error names the index it read.
The Hub tests covered only the fall-through to `model_index.json`. A repo id whose modular index is cached is the path a MiniMax-H3-Image run takes, and returning early when offline would break it with every test green.
diffusers' modular loader passes a spec's `variant` to `from_pretrained`; the backend read only `subfolder`, so a checkpoint that names one would have loaded the repository's default weights of that component without a word. No index read so far names a variant, so the load is refused as untested instead of guessed.
"Names a class the installed library does not provide" is false for a null entry and for a type_hint-only one, which fail in the same place.
…e Hub client's wrapper Offline mode, a refused connection and a timeout all reach the fall-through as one LocalEntryNotFoundError that tells the reader to check their connection; the reason is its cause. The log prints that, and the tests pin both halves of the split: a 404 logs nothing, an offline probe logs why.
…config fall-through The hand-written probe (hf_hub_download, three Hub exception classes, the cause of a wrapped one) did what ModularPipeline.load_config followed by DiffusionPipeline.load_config does, which is how diffusers' modular loader picks the index. A fall-through logs one line whatever its cause, and a modular index that sits in a local directory and cannot be read raises instead of falling through. The three tests that patched the probe become one test of the offline fall-through and its log line.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[H3-Image 2/4] Stacked on #393. MiniMax-H3-Image keeps its Diffusers DiT in
transformer_diffusers/, declared only inmodular_model_index.json; its rootmodel_index.jsonnames the engine's native class intransformer/. The Diffusers backend read only the root index and always used the component's name as the folder, so it could not load this release.Stack:
main<- #393 (step index) <- #394 (loader) <- #395 (family) <- #400 (recipe and model page) and #410 (full-weight training), both on #395. #392 (diffusers 0.43.0) has merged, so the stack runs in the default CI image.What
DiffusersModelBackend._resolve_component(was_resolve_component_class) returns a component's class and its folder. It reads the index diffusers' modular loader reads:ModularPipeline.load_config, and when that raises,DiffusionPipeline.load_configas before.subfolderof the component's loading spec when its index entry has one, else the component's name.--update-weight-target-module transformer), which is also what the rollout engine calls it. Only where its Diffusers weights live changes.Why
[A4]ModularPipeline._load_pipeline_config, so the class and folder are the ones diffusers itself would use, with no Hub probe of miles' own.[A7]pretrained_model_name_or_path) is not followed: weights come from the checkpoint the run names, so a local mirror or a fine-tuned copy that kept the release's index trains its own weights.[A4][A2]Behaviour ledger
_resolve_componentat this head with diffusers 0.43.0 (no weights loaded), by repo id with the Hub reachable:MiniMaxAI/MiniMax-H3-ImagetransformerMiniMaxH3ImageTransformer2DModel,transformer_diffusersMiniMaxAI/MiniMax-H3transformer,transformer_refMiniMaxH3Transformer3DModel, component namenvidia/Cosmos3-NanotransformerCosmos3OmniTransformer,transformerWan-AI/Wan2.2-T2V-A14B-Diffuserstransformer_2WanTransformer3DModel,transformer_2Qwen/Qwen-Image,Qwen/Qwen-Image-2.1transformerQwenImageTransformer2DModel/QwenImage21Transformer2DModel,transformerstabilityai/stable-diffusion-3.5-mediumtransformertransformer*components of the Diffusers checkpoints cached on this box resolve to the class and folder they have on main; the 35th is MiniMax-H3-Image.MilesModelBackendand is not touched.nvidia/Cosmos3-Nano'svision_encoderis in its root index and not in its modular one, and now raises "has no component". miles loads only the components named by--update-weight-target-module, which for Cosmos3 istransformer.HF_HUB_OFFLINEis unset (not timed at this head).revision. A spec that names avariantis refused as untested, since loading without it could read the component's other weights;variantandrevisionare null in every index read for the table.type_hint-only entries ([null, null, {...}]) are rejected as before.Validation
CPU, on this box, CI-recipe environment with diffusers 0.43.0, head 3e082dc:
test_model_backend.py...::test_modular_index_names_the_class_and_the_folder[h3-image, h3]...::test_component_loads_from_the_checkpoint_not_the_repository_its_spec_names...::test_loading_spec_without_a_subfolder_is_rejected,...::test_loading_spec_with_a_weight_variant_is_rejected...::test_checkpoint_without_a_readable_modular_index_reads_model_index_and_logs_it...::test_cached_modular_checkpoint_resolves_from_its_modular_index_while_the_hub_is_offlineMiniMaxAI/MiniMax-H3-Imagetakes...::test_missing_local_checkpoint_is_reported_as_a_missing_directory,...::test_unresolvable_class_names_the_index_it_was_read_fromtests/ci/run_suite.py --hw cpu --suite stage-a-cpuat the stack's two tops, which contain this headpre-commit run --all-filesNot executed: the GPU suites and the e2e.
load_component("transformer")on the released MiniMax-H3-Image snapshot (644 tensors, 33.13 B elements) was run at an earlier head and not repeated; thefrom_pretrainedcall is unchanged.Not in this PR
diffusers_weight_files(checkpoint_path, component), which looks under the component's name. Once both are in, it should take the folder from_resolve_component; whichever merges second adapts.