class documentation

class SingleStageConfig(CustomBaseModel):

View In Hierarchy

Configuration for one model in a conversion pipeline.

Inputs and outputs are inferred from ONNX, OpenVINO IR, and TFLite models when omitted. PyTorch inputs are supported for YOLO models and use the configured yolo_input_shape.

Method get_target_config Returns the target configuration for the given target.
Class Variable disable_onnx_optimization Undocumented
Class Variable disable_onnx_simplification Undocumented
Class Variable input_file_type Undocumented
Class Variable intermediate_outputs_remote_url Undocumented
Class Variable keep_intermediate_outputs Undocumented
Class Variable output_remote_url Undocumented
Class Variable put_file_plugin Undocumented
Instance Variable hailo Hailo-specific settings.
Instance Variable input_bin Weights file paired with an OpenVINO XML graph.
Instance Variable input_model Local or remote path to the source model.
Instance Variable inputs Input tensor definitions and preprocessing.
Instance Variable outputs Output tensor definitions.
Instance Variable rvc2 RVC2-specific settings.
Instance Variable rvc3 RVC3-specific settings.
Instance Variable rvc4 RVC4-specific settings.
Class Method _download_input_model Resolve input model paths and normalize OpenVINO IR inputs.
Class Method _validate_model Expand top-level config shortcuts into explicit tensor config.

Inherited from CustomBaseModel:

Class Variable model_config Undocumented
def get_target_config(self, target: Target) -> TargetConfig:

Returns the target configuration for the given target.

disable_onnx_optimization: bool =

Undocumented

disable_onnx_simplification: bool =

Undocumented

input_file_type: InputFileType =

Undocumented

intermediate_outputs_remote_url: str | None =

Undocumented

keep_intermediate_outputs: bool =

Undocumented

output_remote_url: str | None =

Undocumented

put_file_plugin: str | None =

Undocumented

hailo: HailoConfig =

Hailo-specific settings.

input_bin: Path | None =

Weights file paired with an OpenVINO XML graph.

input_model: Path =

Local or remote path to the source model.

inputs: Annotated[list[InputConfig], Field(min_length=1)] =

Input tensor definitions and preprocessing.

outputs: Annotated[list[OutputConfig], Field(min_length=1)] =

Output tensor definitions.

RVC2-specific settings.

RVC3-specific settings.

RVC4-specific settings.

@model_validator(mode='before')
@classmethod
def _download_input_model(cls, value: dict[str, Any]) -> dict[str, Any]:

Resolve input model paths and normalize OpenVINO IR inputs.

@model_validator(mode='before')
@classmethod
def _validate_model(cls, data: dict[str, Any]) -> dict[str, Any]:

Expand top-level config shortcuts into explicit tensor config.

This fills in inferred metadata, default inputs and outputs, and propagates shared calibration and preprocessing settings down to per-input configuration.