Add transfer inference control-CFG and per-hint defaults - #16
Merged
lfengad merged 2 commits intoJun 7, 2026
Conversation
trungtpham
force-pushed
the
feature/transfer-control-guidance
branch
from
June 3, 2026 21:36
0c7b571 to
24d78b9
Compare
foreverlms
reviewed
Jun 4, 2026
foreverlms
reviewed
Jun 4, 2026
foreverlms
reviewed
Jun 4, 2026
Collaborator
|
@trungtpham Seems that we need first rebase on some newest features from the current main like @foreverlms noted. Currently seems that some new features are occasionally reverted. THX! |
trungtpham
force-pushed
the
feature/transfer-control-guidance
branch
2 times, most recently
from
June 4, 2026 17:04
f9c5399 to
eac2090
Compare
Contributor
Author
|
@foreverlms @lfengad thanks for your review. I rebased the PR to the latest main. Could you please have another look? Thanks |
Collaborator
|
@trungtpham Thx for the action, and seems the two smoke tests broken needs to be fixed? |
Collaborator
|
Will this solve the issue in #14? |
foreverlms
reviewed
Jun 5, 2026
trungtpham
force-pushed
the
feature/transfer-control-guidance
branch
from
June 5, 2026 04:27
09a3b50 to
1a0a7f0
Compare
Preserve existing inference behavior while fixing control_guidance defaults and guarding mixed-rank control-CFG alignment when a local rank has no control branch state.
trungtpham
force-pushed
the
feature/transfer-control-guidance
branch
from
June 5, 2026 05:06
1a0a7f0 to
9ce4424
Compare
Contributor
Author
I have applied fixes. awaiting for test report. |
Contributor
Author
Yes. that's correct. |
lfengad
approved these changes
Jun 5, 2026
Contributor
Author
|
@yy-code-nv could you please help review the PR? Thanks |
lfengad
enabled auto-merge (squash)
June 7, 2026 16:36
rahul-steiger-nv
pushed a commit
to rahul-steiger-nv/cosmos-framework
that referenced
this pull request
Jun 15, 2026
## Summary - Add **control-CFG** (`control_guidance`, optional interval) to sampling args and `OmniMoTModel.generate_samples_from_batch`, including a no-control branch for multi-vision transfer samples. - Wire **transfer inference** in `OmniInference`: dedicated batch path (batch size 1), skip generic `get_sample_data` when transfer hints are set, pass control-CFG through `generate_transfer_sample`. - Extend sample args with **transfer hint fields** on `SampleData` (`edge` / `blur` / `depth` / `seg` / `wsm`), `_TRANSFER_DEFAULTS` (guidance, control_guidance, shift; WSM 101f @ 10 fps), and control-only specs via `control_path` without `vision_path`. - Load **JSON prompts** and **`negative_prompt_file`** only for transfer specs. ## Test plan - [x] Run transfer cookbook / `torchrun -m cosmos_framework.scripts.inference` with `specs/edge.json` on Cosmos3-Nano (`--no-guardrails`). - [x] Verify `control_guidance != 1.0` runs without fallback warning when control + target vision items are present. - [x] Smoke each hint type (edge, blur, depth, seg, wsm) with precomputed `control_path` only. Co-authored-by: lfengad <liangf@nvidia.com>
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.
Summary
control_guidance, optional interval) to sampling args andOmniMoTModel.generate_samples_from_batch, including a no-control branch for multi-vision transfer samples.OmniInference: dedicated batch path (batch size 1), skip genericget_sample_datawhen transfer hints are set, pass control-CFG throughgenerate_transfer_sample.SampleData(edge/blur/depth/seg/wsm),_TRANSFER_DEFAULTS(guidance, control_guidance, shift; WSM 101f @ 10 fps), and control-only specs viacontrol_pathwithoutvision_path.negative_prompt_fileonly for transfer specs.Test plan
torchrun -m cosmos_framework.scripts.inferencewithspecs/edge.jsonon Cosmos3-Nano (--no-guardrails).control_guidance != 1.0runs without fallback warning when control + target vision items are present.control_pathonly.