Skip to content

Support Cosmos3-Super task-specialized (Text2Image / Image2Video) che…#13

Merged
lfengad merged 2 commits into
mainfrom
feat/cosmos3-super-task-checkpoints
Jun 3, 2026
Merged

Support Cosmos3-Super task-specialized (Text2Image / Image2Video) che…#13
lfengad merged 2 commits into
mainfrom
feat/cosmos3-super-task-checkpoints

Conversation

@lfengad
Copy link
Copy Markdown
Collaborator

@lfengad lfengad commented Jun 3, 2026

…ckpoints

These task-specialized diffusers checkpoints reuse the Cosmos3-Super architecture but omit unused modality weights and bundle their own VLM processor. Loading them previously failed, and the processor pulled a redundant full base-Super download.

  • inference/model.py: tolerate absent action/sound projection-head weights in the diffusers load planner, mirroring the existing vision carve-out. Fixes the masked "TypeError: cannot pickle code objects" that surfaced when DCP tried to broadcast the missing-tensor ValueError across ranks. No-op for self-consistent base checkpoints: Nano/Super provide all modality weights, so the guards never fire.

  • inference: add CheckpointConfig.vlm_processor_from_checkpoint. When set, the loader sources the VLM processor from the loaded checkpoint's own bundled files instead of the repository hardcoded in the model config, avoiding a redundant base-Super download. Enabled for the two task checkpoints; base Nano/Super keep their configured repository.

  • data/vfm/processors: clearer error when build_processor_lazy is given neither a repository nor a tokenizer_type source (never fires for existing call sites; only improves a previously-TypeError path).

  • docs/faq.md: add EADDRINUSE / --master-port entry.

  • docs/superpowers/specs: design spec for the processor-source change.

Verified: Text2Image (t2i) and Image2Video (i2v) load and generate; a full base Cosmos3-Nano t2i run is unchanged with strict weight loading intact (carve-out never triggers).

@lfengad lfengad force-pushed the feat/cosmos3-super-task-checkpoints branch from e687153 to 7600d64 Compare June 3, 2026 10:21
…ckpoints

These task-specialized diffusers checkpoints reuse the Cosmos3-Super
architecture but omit unused modality weights and bundle their own VLM
processor. Loading them previously failed, and the processor pulled a
redundant full base-Super download.

- inference/model.py: tolerate absent action/sound projection-head
  weights in the diffusers load planner, mirroring the existing vision
  carve-out. Fixes the masked "TypeError: cannot pickle code objects"
  that surfaced when DCP tried to broadcast the missing-tensor
  ValueError across ranks. No-op for self-consistent base checkpoints:
  Nano/Super provide all modality weights, so the guards never fire.

- inference: add CheckpointConfig.vlm_processor_from_checkpoint. When
  set, the loader sources the VLM processor from the loaded checkpoint's
  own bundled files instead of the repository hardcoded in the model
  config, avoiding a redundant base-Super download. Enabled for the two
  task checkpoints; base Nano/Super keep their configured repository.

- docs/faq.md: add EADDRINUSE / --master-port entry.

Verified: Text2Image (t2i) and Image2Video (i2v) load and generate; a
full base Cosmos3-Nano t2i run is unchanged with strict weight loading
intact (carve-out never triggers).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lfengad lfengad force-pushed the feat/cosmos3-super-task-checkpoints branch from 7600d64 to 0fd3d55 Compare June 3, 2026 10:22
),
"Cosmos3-Super-Text2Image": CheckpointConfig(
model_memory_bytes=MODEL_MEMORY_BYTES_BY_SIZE["32B"],
config_file=str(CONFIG_DIR / "model/Cosmos3-Super.yaml"),
Copy link
Copy Markdown
Collaborator

@foreverlms foreverlms Jun 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure that these two specialized models could just reuse this super yaml file, that they do not have specialized training config?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we have run the test and verified.

@lfengad lfengad merged commit cbaf5b9 into main Jun 3, 2026
1 check passed
@lfengad lfengad deleted the feat/cosmos3-super-task-checkpoints branch June 3, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants