Export Cosmos3 Edge scheduler metadata#130
Merged
Merged
Conversation
Port of imaginaire4 MR !10668. - Instantiate Cosmos3EdgeUniPCMultistepScheduler for Edge models so the exported scheduler matches inference (previously Edge fell into the generic Karras UniPC branch). - Populate model_index.json native_flow_shift by reading flow_shift back from the saved scheduler/scheduler_config.json rather than hardcoding it, so the two values cannot drift. - Propagate pipeline-behavior fields (default_use_system_prompt, enable_safety_checker, use_native_flow_schedule, native_flow_shift) from model_index.json into modular_model_index.json, gated on key presence. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Move the Cosmos3EdgeUniPCMultistepScheduler import into a try/except (mirroring the existing Cosmos3OmniPipeline guard) so older Diffusers builds that predate the Edge scheduler can still run non-Edge conversions. Edge conversions on such builds now raise a clear, actionable ImportError at use time instead of failing at module load. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
yy-code-nv
approved these changes
Jul 23, 2026
lfengad
enabled auto-merge (squash)
July 23, 2026 12:05
foreverlms
approved these changes
Jul 23, 2026
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.
Port of imaginaire4 MR !10668 into the OSS
cosmos-frameworkrepo.What
Exports Cosmos3 Edge scheduler metadata into both
model_index.jsonandmodular_model_index.jsonduring Diffusers conversion._convert_model_to_diffusers.pyelif is_edge_modelbranch that instantiatesCosmos3EdgeUniPCMultistepScheduler(flow_shift=3.0). Previously Edge checkpoints fell into the generic KarrasUniPCMultistepSchedulerbranch._normalize_edge_model_indexnow readsflow_shiftback from the already-writtenscheduler/scheduler_config.jsonto populatenative_flow_shift, so the exported value cannot drift from the scheduler constructor argument (addresses the reviewer P2 comment on the original MR).convert_model_to_diffusers.pyPIPELINE_BEHAVIOR_FIELDSand propagate those metadata fields frommodel_index.jsonintomodular_model_index.json, gated on key presence so pipelines lacking them are unaffected.Notes
Cosmos3EdgeUniPCMultistepScheduler. The import is ungated at module top-level, consistent with the existingCosmos3OmniTransformerimport — the converter already requires a bleeding-edge Diffusers build.cosmos_framework/scripts/here vspackages/cosmos3/cosmos3/scripts/upstream.🤖 Generated with Claude Code