Skip to content

[Cosmos3] Fix Transfer SeaCache artifacts with control CFG - #14897

Open
yzhautouskay wants to merge 2 commits into
huggingface:mainfrom
yzhautouskay:yzhautouskay/cosmos3_seacache_transfer_fix
Open

yzhautouskay wants to merge 2 commits into
huggingface:mainfrom
yzhautouskay:yzhautouskay/cosmos3_seacache_transfer_fix

Conversation

@yzhautouskay

Copy link
Copy Markdown
Contributor

What does this PR do?

Follow-up to #14663

Fixes Cosmos3 Transfer quality artifacts when SeaCache is combined with control CFG. The cache indicator now uses only noisy target latents, excluding separate clean control-hint latents. Control hints still condition the transformer, and each CFG branch retains its own residual history.

Validation:

  • Added regressions for target-only indicators, branch histories, cache decisions, residual orders 0/1, and state reset
  • All six BF16/FP8 comparisons improved LPIPS, PSNR, and SSIM while retaining 2.10-2.18脳 speedup
  • I2V, T2V, and action modes were bitwise identical before and after the change in BF16 and FP8
  • 47 model tests and 19 targeted SeaCache tests passed; make style and make fix-copies passed

Self-review: READY. No blocking, non-blocking, or dead-code findings.

Test results

The current cache quality issue is input-dependent because control-CFG branch schedules can diverge very differently across examples, independent of the control type alone. Some show little degradation, while others develop severe temporal/block artifacts. The effect is amplified with FP8-quantized checkpoints.

This PR addresses the observed flickering and severe degradation in both BF16 and FP8 runs. All six example/precision comparisons improve LPIPS, PSNR, and SSIM against their matching uncached baseline.

Rows: BF16 (top), FP8 (bottom).
Columns, left to right: uncached / current cache / this PR fix.
Videos include latency, speedup, LPIPS, PSNR, and SSIM.

diffusers_0200_edge_six_arm.mp4
diffusers_0539_seg_six_arm.mp4

Before submitting

  • Did you use an AI agent (Claude Code, Codex, Cursor, etc.) to help with this PR? If so:
    • Did you read the Coding with AI agents guide?
    • Did you run the self-review skill on the diff?
    • Did you share the final self-review notes in the PR description or a comment?
  • Did you read the contributor guideline?
  • Did you read our philosophy doc? (important for complex PRs)
  • Was this discussed/approved via a GitHub issue or the forum? Please add a link to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?
  • Are you the author (or part of the team) of the model/pipeline (only applicable for model/pipeline related PRs)?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@github-actions github-actions Bot added size/M PR with diff < 200 LOC documentation Improvements or additions to documentation tests hooks and removed size/M PR with diff < 200 LOC labels Sep 28, 2026
@github-actions github-actions Bot added the size/M PR with diff < 200 LOC label Sep 28, 2026

This branch has not been deployed

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

Labels

documentation Improvements or additions to documentation hooks size/M PR with diff < 200 LOC tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant