[None][fix] Reword Cosmos3 negative prompt terms that trip the guardrail blocklist - #17523
Conversation
…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>
WalkthroughThe 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. ChangesCosmos3 prompt wording
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
|
/bot run |
|
/bot run --disable-fail-fast |
|
PR_Github #65405 [ run ] triggered by Bot. Commit: |
|
PR_Github #65406 [ run ] triggered by Bot. Commit: |
|
PR_Github #65405 [ run ] completed with state |
|
PR_Github #65406 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #67018 [ run ] triggered by Bot. Commit: |
|
PR_Github #67018 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
2 similar comments
|
/bot run --disable-fail-fast |
|
/bot run --disable-fail-fast |
|
PR_Github #67294 [ run ] triggered by Bot. Commit: |
|
PR_Github #67294 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #67308 [ run ] triggered by Bot. Commit: |
|
PR_Github #67308 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #67324 [ run ] triggered by Bot. Commit: |
|
/bot run --disable-fail-fast |
|
PR_Github #67385 [ run ] triggered by Bot. Commit: |
|
PR_Github #67385 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #67397 [ run ] triggered by Bot. Commit: |
|
PR_Github #67397 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #67408 [ run ] triggered by Bot. Commit: |
|
PR_Github #67408 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #67411 [ run ] triggered by Bot. Commit: |
|
PR_Github #67411 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #67415 [ run ] triggered by Bot. Commit: |
|
PR_Github #67415 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #67425 [ run ] triggered by Bot. Commit: |
|
PR_Github #67425 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #67434 [ run ] triggered by Bot. Commit: |
|
PR_Github #67434 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #67481 [ run ] triggered by Bot. Commit: |
|
PR_Github #67481 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #67493 [ run ] triggered by Bot. Commit: |
|
PR_Github #67493 [ run ] completed with state |
@coderabbitai summary
Description
Two words in the shipped Cosmos3 negative prompts (
negative_prompt.pyandcosmos3_negative_prompt.json) are on the Cosmos guardrail's custom blocklist:"bleeding"(in"color bleeding between elements", a rendering artifactdescription) 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, sothe 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 beforeapplying; all pass with zero flagged words.
Full
CosmosSafetyChecker(blocklist + Qwen3Guard) verified on both promptsafter 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=1and
cosmos_guardrailis not installed in CI, so a test asserting "the shippednegative prompts pass the guardrail" cannot run there.
Verified manually instead:
against
Blocklist.censor_prompt; zero flagged after rewording.CosmosSafetyChecker.check_text_safety()(blocklist + Qwen3Guard) onjson.dumps(COSMOS3_VIDEO_NEGATIVE_PROMPT)and on the examples JSON, loadedthe same way
cosmos3.pyloads 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-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin 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.