Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions src/matteloop/core/execution_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def _provider_label(
) -> str:
label = provider_base_label(provider)
if provider == COREML_EXECUTION_PROVIDER and model_id.startswith("birefnet"):
return f"{label} – experimentell"
return f"{label} – experimental"
if provider == recommended:
return f"{label} – empfohlen"
return f"{label} – recommended"
return label
2 changes: 1 addition & 1 deletion src/matteloop/core/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def _reduce_execution_provider(
return _invalidate(
state,
replace(state.parameters, execution_provider=event.execution_provider),
"Rechenbeschleunigung",
"Compute acceleration",
)


Expand Down
3 changes: 1 addition & 2 deletions src/matteloop/jobs/segmentation_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -1585,8 +1585,7 @@ def _create_cpu_fallback_session(
session,
inference_kwargs,
CPU_EXECUTION_PROVIDER,
f"{label} konnte dieses Modell nicht laden. Die Verarbeitung wird "
"automatisch über die CPU fortgesetzt.",
f"{label} could not load this model. Processing continues on the CPU.",
)


Expand Down
4 changes: 2 additions & 2 deletions src/matteloop/ui/inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def _build_segmentation_parameter_controls(self) -> None:
self.set_model_status("ready")
self.provider_picker = compact_field(ElidingComboBox())
self.provider_picker.setObjectName("provider_picker")
self.provider_picker.setAccessibleName("Rechenbeschleunigung")
self.provider_picker.setAccessibleName("Compute acceleration")
self._set_provider_options(catalog.default_id)
self.edge_picker = compact_field(ElidingComboBox())
self.edge_picker.setObjectName("edge_picker")
Expand Down Expand Up @@ -636,7 +636,7 @@ def _segmentation_controls(self) -> QWidget:
model_layout.addWidget(self.model_picker, 1)
model_layout.addWidget(self.model_status)
layout.addRow(self._form_label("Model"), model_row)
layout.addRow(self._form_label("Rechenbeschleunigung"), self.provider_picker)
layout.addRow(self._form_label("Compute acceleration"), self.provider_picker)
layout.addRow(self._form_label("Edge treatment"), self.edge_picker)
return controls

Expand Down
6 changes: 3 additions & 3 deletions tests/core/test_execution_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def test_apple_silicon_prefers_cpu_while_offering_coreml_as_experimental() -> No
COREML_EXECUTION_PROVIDER,
]
assert select_provider(None, options) == CPU_EXECUTION_PROVIDER
assert options[0].label == "CPU – empfohlen"
assert options[1].label == "Apple CoreML – experimentell"
assert options[0].label == "CPU – recommended"
assert options[1].label == "Apple CoreML – experimental"
assert options[1].recommended is False


Expand Down Expand Up @@ -91,7 +91,7 @@ def test_windows_directml_is_preselected_without_cuda_or_amd_providers() -> None
DML_EXECUTION_PROVIDER,
CPU_EXECUTION_PROVIDER,
}
assert directml_options[0].label == "GPU over DirectML – empfohlen"
assert directml_options[0].label == "GPU over DirectML – recommended"
assert select_provider(None, cuda_options) == CUDA_EXECUTION_PROVIDER


Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def test_execution_provider_changes_stale_the_current_preview() -> None:

assert changed.parameters.execution_provider == "CUDAExecutionProvider"
assert changed.preview is PreviewState.STALE
assert changed.stale_category == "Rechenbeschleunigung"
assert changed.stale_category == "Compute acceleration"


def test_cleanup_parameter_changes_stale_the_current_preview() -> None:
Expand Down
2 changes: 1 addition & 1 deletion tests/jobs/models/test_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ def InferenceSession(
assert isinstance(prepared, _PreparedRembgSession)
assert prepared.execution_provider == CPU_EXECUTION_PROVIDER
assert prepared.startup_notice is not None
assert "CPU fortgesetzt" in prepared.startup_notice
assert "continues on the CPU" in prepared.startup_notice
assert calls == [
[CUDA_EXECUTION_PROVIDER, CPU_EXECUTION_PROVIDER],
[CPU_EXECUTION_PROVIDER],
Expand Down
5 changes: 4 additions & 1 deletion tests/test_app_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ def test_provider_command_prints_fake_runtime_facts(
output = capsys.readouterr().out
assert "ONNX Runtime distribution: fake 1.2" in output
assert "onnxruntime device: GPU" in output
assert "DmlExecutionProvider: GPU over DirectML – empfohlen [recommended]" in output
assert (
"DmlExecutionProvider: GPU over DirectML – recommended [recommended]"
in output
)
assert "CPUExecutionProvider: CPU" in output


Expand Down
6 changes: 3 additions & 3 deletions tests/ui/test_parameter_inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,10 @@ def test_inspector_exposes_and_emits_the_selected_execution_provider(qtbot) -> N
inspector = Inspector(
_settings(),
provider_options=(
ProviderOption(CPU_EXECUTION_PROVIDER, "CPU – empfohlen", True),
ProviderOption(CPU_EXECUTION_PROVIDER, "CPU – recommended", True),
ProviderOption(
COREML_EXECUTION_PROVIDER,
"Apple CoreML – experimentell",
"Apple CoreML – experimental",
),
),
)
Expand All @@ -239,7 +239,7 @@ def test_inspector_exposes_and_emits_the_selected_execution_provider(qtbot) -> N
inspector.command_requested.connect(commands.append)

assert inspector.provider_picker.currentData() == CPU_EXECUTION_PROVIDER
assert inspector.provider_picker.itemText(1) == "Apple CoreML – experimentell"
assert inspector.provider_picker.itemText(1) == "Apple CoreML – experimental"
inspector.provider_picker.setCurrentIndex(1)

assert [type(command).__name__ for command in commands] == [
Expand Down
Loading