@@ -2147,16 +2147,11 @@ def _configure_dlc(self) -> bool:
21472147 RuntimeError ,
21482148 json .JSONDecodeError ,
21492149 ) as exc :
2150- self ._show_error (
2151- f"Invalid DLCLive settings: { exc } "
2152- )
2150+ self ._show_error (f"Invalid DLCLive settings: { exc } " )
21532151 return False
21542152
21552153 if not settings .model_path :
2156- self ._show_error (
2157- "Please select a DLCLive model before "
2158- "starting inference."
2159- )
2154+ self ._show_error ("Please select a DLCLive model before starting inference." )
21602155 return False
21612156
21622157 processor = None
@@ -2167,26 +2162,21 @@ def _configure_dlc(self) -> bool:
21672162
21682163 if self ._custom_processor_enabled ():
21692164 try :
2170- processor_info = self ._scanned_processors [
2171- selected_key
2172- ]
2165+ processor_info = self ._scanned_processors [selected_key ]
21732166 processor_class = processor_info ["class" ]
21742167 processor_name = processor_info .get (
21752168 "name" ,
21762169 processor_class .__name__ ,
21772170 )
21782171
2179- if processor_builds_in_worker (
2180- processor_class
2181- ):
2172+ if processor_builds_in_worker (processor_class ):
21822173 processor_spec = create_spec_from_scan (
21832174 self ._scanned_processors ,
21842175 selected_key ,
21852176 )
21862177
21872178 log_processor_context (
2188- "MainWindow._configure_dlc - "
2189- f"SPEC: { processor_class .__name__ } " ,
2179+ f"MainWindow._configure_dlc - SPEC: { processor_class .__name__ } " ,
21902180 logger ,
21912181 )
21922182 else :
@@ -2196,8 +2186,7 @@ def _configure_dlc(self) -> bool:
21962186 )
21972187
21982188 log_processor_context (
2199- "MainWindow._configure_dlc - "
2200- f"INSTANCE: { type (processor ).__name__ } " ,
2189+ f"MainWindow._configure_dlc - INSTANCE: { type (processor ).__name__ } " ,
22012190 logger ,
22022191 )
22032192
@@ -2207,10 +2196,7 @@ def _configure_dlc(self) -> bool:
22072196 )
22082197
22092198 except Exception as exc :
2210- error_msg = (
2211- "Failed to configure processor: "
2212- f"{ exc } "
2213- )
2199+ error_msg = f"Failed to configure processor: { exc } "
22142200 self ._show_error (error_msg )
22152201 logger .exception (error_msg )
22162202 return False
@@ -2226,9 +2212,7 @@ def _configure_dlc(self) -> bool:
22262212 processor = processor ,
22272213 processor_spec = processor_spec ,
22282214 )
2229- self ._model_path_store .save_if_valid (
2230- settings .model_path
2231- )
2215+ self ._model_path_store .save_if_valid (settings .model_path )
22322216 return True
22332217
22342218 def _update_inference_buttons (self ) -> None :
0 commit comments