Skip to content

[None][fix] Reword Cosmos3 negative prompt terms that trip the guardrail blocklist - #17523

Merged
chang-l merged 1 commit into
NVIDIA:mainfrom
ishovkun:cosmos3-fix-negative-prompt-blocklist
Aug 19, 2026
Merged

[None][fix] Reword Cosmos3 negative prompt terms that trip the guardrail blocklist#17523
chang-l merged 1 commit into
NVIDIA:mainfrom
ishovkun:cosmos3-fix-negative-prompt-blocklist

Conversation

@ishovkun

@ishovkun ishovkun commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai summary

Description

Two words in the shipped Cosmos3 negative prompts (negative_prompt.py and
cosmos3_negative_prompt.json) are on the Cosmos guardrail's custom blocklist:
"bleeding" (in "color bleeding between elements", a rendering artifact
description) and "lifeless" (in "the scene feels lifeless and sterile").
Out of 623 unique words in the prompt, these are the only two flagged — neither
is profanity. They are presumably on the blocklist as violence-adjacent words.

Any request that passes a negative prompt explicitly is blocked before
generation. The Cosmos3 example script (cosmos3.py) does this by default, so
the documented workflow fails every time guardrails are enabled — even with the
model-card caption as the positive prompt, which passes cleanly.

Fix: reword to "color smearing between elements" and "feels inert and sterile". Both replacements were validated against the real blocklist before
applying; all pass with zero flagged words.

Full CosmosSafetyChecker (blocklist + Qwen3Guard) verified on both prompts
after rewording — both return safe.

This is a follow-up to #17510 (which makes a blocked request return cleanly);
this PR prevents legitimate prompts from being blocked in the first place.

Test Coverage

No automated test is added: CI runs with TRTLLM_DISABLE_COSMOS3_GUARDRAILS=1
and cosmos_guardrail is not installed in CI, so a test asserting "the shipped
negative prompts pass the guardrail" cannot run there.

Verified manually instead:

  1. Word-level blocklist scan — enumerated all 623 unique words in each prompt
    against Blocklist.censor_prompt; zero flagged after rewording.
  2. Full CosmosSafetyChecker.check_text_safety() (blocklist + Qwen3Guard) on
    json.dumps(COSMOS3_VIDEO_NEGATIVE_PROMPT) and on the examples JSON, loaded
    the same way cosmos3.py loads it — both return safe.

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.

  • PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.

  • Test cases are provided for new code paths (see test instructions)

  • If PR introduces API changes, an appropriate PR label is added - either api-compatible or api-breaking. For api-breaking, include BREAKING in the PR title.

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • Update tava architecture diagram if there is a significant design change in PR.

  • The reviewers assigned automatically/manually are appropriate for the PR.

  • Please check this after reviewing the above items as appropriate for this PR.

GitHub Bot Help

To see a list of available CI bot commands, please comment /bot help.

…ail blocklist

Two words in the shipped negative prompts are on the Cosmos guardrail's
custom blocklist: "bleeding" (in "color bleeding between elements", a
rendering artifact) and "lifeless" (in "the scene feels lifeless and
sterile"). Out of 623 unique words in the prompt these are the only two
flagged, and neither is profanity.

Any request passing a negative prompt explicitly is therefore blocked
before generation. The example script does exactly that, so the
documented workflow fails every time guardrails are enabled.

Reword to "color smearing" and "feels inert and sterile"; both clear the
blocklist with no flagged words remaining.

Signed-off-by: Igor Shovkun <ishovkun@nvidia.com>
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The Cosmos3 negative prompts now use “color smearing” for three subject appearance entries and “inert” for the aesthetics mood description in both JSON and Python definitions.

Changes

Cosmos3 prompt wording

Layer / File(s) Summary
Synchronize negative prompt wording
examples/visual_gen/models/cosmos3/cosmos3_negative_prompt.json, tensorrt_llm/_torch/visual_gen/models/cosmos3/negative_prompt.py
The three subject appearance descriptions replace “color bleeding” with “color smearing.” The aesthetics mood description replaces “lifeless” with “inert.”

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: bowenfu

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies a fix to Cosmos3 negative prompt terms that trigger the guardrail blocklist.
Description check ✅ Passed The description explains the issue, solution, validation, test limitations, and checklist status in sufficient detail.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@ishovkun

Copy link
Copy Markdown
Contributor Author

/bot run

@ishovkun

Copy link
Copy Markdown
Contributor Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65405 [ run ] triggered by Bot. Commit: 98bce4d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65406 [ run ] triggered by Bot. Commit: 98bce4d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65405 [ run ] completed with state ABORTED. Commit: 98bce4d

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65406 [ run ] completed with state SUCCESS. Commit: 98bce4d
/LLM/main/L0_MergeRequest_PR pipeline #53163 completed with status: 'UNSTABLE'

CI Report

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Ask a member of NVIDIA/trt-llm-ci-approvers to add the label, then re-trigger CI with the same bot command (no rebase needed).

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

Link to invocation

@xrq-phys xrq-phys left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

Comment thread tensorrt_llm/_torch/visual_gen/models/cosmos3/negative_prompt.py
@xrq-phys

Copy link
Copy Markdown
Collaborator

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67018 [ run ] triggered by Bot. Commit: 98bce4d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67018 [ run ] completed with state FAILURE. Commit: 98bce4d
/LLM/main/L0_MergeRequest_PR pipeline #54564 completed with status: 'UNSTABLE'

CI Report

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Ask a member of NVIDIA/trt-llm-ci-approvers to add the label, then re-trigger CI with the same bot command (no rebase needed).

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

Link to invocation

@ishovkun

Copy link
Copy Markdown
Contributor Author

/bot run --disable-fail-fast

2 similar comments
@ishovkun

Copy link
Copy Markdown
Contributor Author

/bot run --disable-fail-fast

@ishovkun

Copy link
Copy Markdown
Contributor Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67294 [ run ] triggered by Bot. Commit: 98bce4d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67294 [ run ] completed with state FAILURE. Commit: 98bce4d
/LLM/main/L0_MergeRequest_PR pipeline #54816 completed with status: 'UNSTABLE'

CI Report

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Ask a member of NVIDIA/trt-llm-ci-approvers to add the label, then re-trigger CI with the same bot command (no rebase needed).

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

Link to invocation

@ishovkun

Copy link
Copy Markdown
Contributor Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67308 [ run ] triggered by Bot. Commit: 98bce4d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67308 [ run ] completed with state FAILURE. Commit: 98bce4d
/LLM/main/L0_MergeRequest_PR pipeline #54828 completed with status: 'UNSTABLE'

CI Report

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Ask a member of NVIDIA/trt-llm-ci-approvers to add the label, then re-trigger CI with the same bot command (no rebase needed).

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

Link to invocation

@ishovkun

Copy link
Copy Markdown
Contributor Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67324 [ run ] triggered by Bot. Commit: 98bce4d Link to invocation

@ishovkun

Copy link
Copy Markdown
Contributor Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67385 [ run ] triggered by Bot. Commit: 98bce4d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67385 [ run ] completed with state FAILURE. Commit: 98bce4d
/LLM/main/L0_MergeRequest_PR pipeline #54894 completed with status: 'UNSTABLE'

CI Report

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Ask a member of NVIDIA/trt-llm-ci-approvers to add the label, then re-trigger CI with the same bot command (no rebase needed).

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

Link to invocation

@ishovkun

Copy link
Copy Markdown
Contributor Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67397 [ run ] triggered by Bot. Commit: 98bce4d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67397 [ run ] completed with state FAILURE. Commit: 98bce4d
/LLM/main/L0_MergeRequest_PR pipeline #54904 completed with status: 'UNSTABLE'

CI Report

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Ask a member of NVIDIA/trt-llm-ci-approvers to add the label, then re-trigger CI with the same bot command (no rebase needed).

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

Link to invocation

@ishovkun

Copy link
Copy Markdown
Contributor Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67408 [ run ] triggered by Bot. Commit: 98bce4d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67408 [ run ] completed with state FAILURE. Commit: 98bce4d
/LLM/main/L0_MergeRequest_PR pipeline #54915 completed with status: 'UNSTABLE'

CI Report

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Ask a member of NVIDIA/trt-llm-ci-approvers to add the label, then re-trigger CI with the same bot command (no rebase needed).

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

Link to invocation

@ishovkun

Copy link
Copy Markdown
Contributor Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67411 [ run ] triggered by Bot. Commit: 98bce4d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67411 [ run ] completed with state FAILURE. Commit: 98bce4d
/LLM/main/L0_MergeRequest_PR pipeline #54918 completed with status: 'UNSTABLE'

CI Report

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Ask a member of NVIDIA/trt-llm-ci-approvers to add the label, then re-trigger CI with the same bot command (no rebase needed).

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

Link to invocation

@ishovkun

Copy link
Copy Markdown
Contributor Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67415 [ run ] triggered by Bot. Commit: 98bce4d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67415 [ run ] completed with state FAILURE. Commit: 98bce4d
/LLM/main/L0_MergeRequest_PR pipeline #54921 completed with status: 'UNSTABLE'

CI Report

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Ask a member of NVIDIA/trt-llm-ci-approvers to add the label, then re-trigger CI with the same bot command (no rebase needed).

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

Link to invocation

@ishovkun

Copy link
Copy Markdown
Contributor Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67425 [ run ] triggered by Bot. Commit: 98bce4d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67425 [ run ] completed with state FAILURE. Commit: 98bce4d
/LLM/main/L0_MergeRequest_PR pipeline #54930 completed with status: 'UNSTABLE'

CI Report

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Ask a member of NVIDIA/trt-llm-ci-approvers to add the label, then re-trigger CI with the same bot command (no rebase needed).

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

Link to invocation

@ishovkun

Copy link
Copy Markdown
Contributor Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67434 [ run ] triggered by Bot. Commit: 98bce4d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67434 [ run ] completed with state FAILURE. Commit: 98bce4d
/LLM/main/L0_MergeRequest_PR pipeline #54937 completed with status: 'UNSTABLE'

CI Report

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Ask a member of NVIDIA/trt-llm-ci-approvers to add the label, then re-trigger CI with the same bot command (no rebase needed).

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

Link to invocation

@ishovkun

Copy link
Copy Markdown
Contributor Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67481 [ run ] triggered by Bot. Commit: 98bce4d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67481 [ run ] completed with state FAILURE. Commit: 98bce4d
/LLM/main/L0_MergeRequest_PR pipeline #54979 completed with status: 'UNSTABLE'

CI Report

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Ask a member of NVIDIA/trt-llm-ci-approvers to add the label, then re-trigger CI with the same bot command (no rebase needed).

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

Link to invocation

@ishovkun

Copy link
Copy Markdown
Contributor Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67493 [ run ] triggered by Bot. Commit: 98bce4d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #67493 [ run ] completed with state SUCCESS. Commit: 98bce4d
/LLM/main/L0_MergeRequest_PR pipeline #54990 completed with status: 'SUCCESS'
Pipeline passed with automatic retried tests. Check the rerun report for details.

CI Report

Link to invocation

@chang-l
chang-l merged commit 9c89503 into NVIDIA:main Aug 19, 2026
18 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants