sgl-project/sglang · error · ValueError
server_args is required to resolve Ideogram4 NVFP4 paths
Error message
server_args is required to resolve Ideogram4 NVFP4 paths
What it means
Raised by Ideogram4Pipeline._get_model_resolution when the NVFP4 model-path resolution has not been cached yet and the caller passes server_args=None. The resolution needs ServerArgs (quantization overrides, model paths) to locate the Ideogram4 NVFP4 weights, so it cannot run lazily without them.
Source
Thrown at python/sglang/multimodal_gen/runtime/pipelines/ideogram.py:199
)
self.add_stage_factory(
RoleType.DECODER,
lambda: Ideogram4DecodingStage(vae=self.get_module("vae")),
"ideogram4_decoding_stage",
)
class Ideogram4Nvfp4Pipeline(Ideogram4Pipeline):
pipeline_name = "Ideogram4Nvfp4Pipeline"
_model_resolution: Ideogram4Nvfp4ModelResolution | None = None
def _get_model_resolution(
self,
server_args: ServerArgs | None = None,
) -> Ideogram4Nvfp4ModelResolution:
if self._model_resolution is None:
if server_args is None:
raise ValueError(
"server_args is required to resolve Ideogram4 NVFP4 paths"
)
self._model_resolution = resolve_ideogram4_nvfp4_model(
server_args,
self.model_path,
)
return self._model_resolution
def _load_config(self) -> dict[str, Any]:
model_resolution = self._get_model_resolution(self.server_args)
logger.info("Model path: %s", self.model_path)
logger.info(
"Using base model '%s' at %s for config and non-transformer components",
model_resolution.base_model_name,
model_resolution.base_model_path,
)
config = verify_model_config_and_directory(model_resolution.base_model_path)
return cast(dict[str, Any], config)View on GitHub (pinned to 0132848349)
Solutions
- Pass the real ServerArgs through to _get_model_resolution(server_args=server_args) on the first invocation so the resolution is cached
- Fix the caller chain (_load_config / _resolve_component_path / load_modules overrides) to forward server_args instead of None
- In tests, call _get_model_resolution(server_args=build_server_args()) once up front to prime _model_resolution
Example fix
// before resolution = pipeline._get_model_resolution() # cache empty -> ValueError // after resolution = pipeline._get_model_resolution(server_args=server_args)
Defensive patterns
Strategy: validation
Validate before calling
if pipeline._model_resolution is None:
if server_args is None:
raise SystemExit('ServerArgs required before resolving Ideogram4 NVFP4 paths')
pipeline._get_model_resolution(server_args=server_args) Prevention
- Always thread ServerArgs through the first call to _get_model_resolution
- Prime the resolution cache immediately after pipeline construction
- Avoid calling private helpers (_load_config, _resolve_component_path) without server_args in scope
When it happens
Trigger: Calling _get_model_resolution() with no argument (or None) before any prior call that passed server_args; calling helpers that depend on it — _load_config, _resolve_component_path, load_modules — on a pipeline instance whose _model_resolution cache is empty and whose code path forwards server_args=None.
Common situations: Custom loaders or tests that construct the pipeline and call config-loading helpers without threading ServerArgs through; refactors that dropped the server_args parameter from an internal call chain.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Usage: sglang serve --model-path <model-name-or-path> [addit
- Error: --model-path is required. Please provide the path to
- v_cache must be provided
- q must be provided unless qv is provided with only_qv=True
- MiniMax-H3 NVFP4 metadata requires checkpoint files
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/6f42867d9410d662.
Report an issue: GitHub.