diff --git a/requirements/common.txt b/requirements/common.txt index 243a6ce7e..13c7d35a9 100644 --- a/requirements/common.txt +++ b/requirements/common.txt @@ -34,3 +34,5 @@ pydantic-settings>=2.0.0 # base image does not ship it, so declare it explicitly. The loader also guards # this import so a missing gguf no longer breaks all diffusion model loading. gguf>=0.10.0 +# Required for running the Cosmos3 model with guardrails enabled (default behavior). +cosmos-guardrail>=0.3.1 diff --git a/vllm_omni/diffusion/models/cosmos3/guardrails.py b/vllm_omni/diffusion/models/cosmos3/guardrails.py index 3c6166e85..3065f58ac 100644 --- a/vllm_omni/diffusion/models/cosmos3/guardrails.py +++ b/vllm_omni/diffusion/models/cosmos3/guardrails.py @@ -65,11 +65,10 @@ except ImportError: # ``model_config["guardrails"]`` is False. def __init__(self, *args, **kwargs): raise ValueError( - f"You have disabled the safety checker for {self.__class__}. This is in violation of the " + f"The guardrails are enabled but not functional for {self.__class__}. This is most likely due to a" + f"missing cosmos-guardrail package. Please install cosmos-guardrail to be compliant with the " "[NVIDIA Open Model License Agreement]" - "(https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-open-model-license). " - f"Please ensure that you are compliant with the license agreement." - f"Please install cosmos-guardrail package to enable safety checks." + "(https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-open-model-license)." )