Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inference Fix for Multistage Models #6

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fixed inference bug when skipping calibration
kozlov721 committed Jul 16, 2024
commit 1f8bf8a3bac8d5fa778b98685b3ab8a31086a12e
4 changes: 3 additions & 1 deletion modelconverter/packages/rvc4/exporter.py
Original file line number Diff line number Diff line change
@@ -61,6 +61,9 @@ def __init__(self, config: SingleStageConfig, output_dir: Path):
self.input_list_path = self.intermediate_outputs_dir / "img_list.txt"

def export(self) -> Path:
out_dlc_path = self.output_dir / f"{self.model_name}.dlc"
self._inference_model_path = out_dlc_path

dlc_path = self.onnx_to_dlc()
if self._disable_calibration:
return dlc_path
@@ -96,7 +99,6 @@ def export(self) -> Path:
self.input_list_path.unlink()

logger.info("Performing offline graph preparation.")
out_dlc_path = self.output_dir / f"{self.model_name}.dlc"
args = self.snpe_dlc_graph_prepare
self._add_args(args, ["--input_dlc", quantized_dlc_path])
self._add_args(args, ["--output_dlc", out_dlc_path])