Loading modules/base.py +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ from typing import Dict from utils.logger import logger as LOGGER import gc GPUINTENSIVE_SET = {'cuda', 'hip'} GPUINTENSIVE_SET = {'cuda'} class BaseModule: Loading modules/inpaint/__init__.py +0 −2 Original line number Diff line number Diff line Loading @@ -145,7 +145,6 @@ class AOTInpainter(InpainterBase): 'options': [ 'cpu', 'cuda', 'hip' ], 'select': DEFAULT_DEVICE }, Loading Loading @@ -251,7 +250,6 @@ class LamaInpainterMPE(InpainterBase): 'options': [ 'cpu', 'cuda', 'hip' ], 'select': DEFAULT_DEVICE } Loading modules/ocr/__init__.py +0 −3 Original line number Diff line number Diff line Loading @@ -89,7 +89,6 @@ class OCRMIT32px(OCRBase): 'options': [ 'cpu', 'cuda', 'hip' ], 'select': DEFAULT_DEVICE }, Loading Loading @@ -138,7 +137,6 @@ class MangaOCR(OCRBase): 'options': [ 'cpu', 'cuda', 'hip' ], 'select': DEFAULT_DEVICE } Loading Loading @@ -209,7 +207,6 @@ class OCRMIT48pxCTC(OCRBase): 'options': [ 'cpu', 'cuda', 'hip' ], 'select': DEFAULT_DEVICE }, Loading modules/textdetector/__init__.py +0 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,6 @@ class ComicTextDetector(TextDetectorBase): 'options': [ 'cpu', 'cuda', 'hip' ], 'select': DEFAULT_DEVICE }, Loading ui/dlconfig_parse_widgets.py +13 −9 Original line number Diff line number Diff line Loading @@ -126,15 +126,14 @@ class ParamWidget(QWidget): param_layout.setContentsMargins(0, 0, 0, 0) param_layout.setSpacing(14) for param_key in params: param_label = ParamNameLabel(param_key) if param_key == 'description': continue param_label = ParamNameLabel(param_key) is_str = isinstance(params[param_key], str) is_digital = isinstance(params[param_key], float) or isinstance(params[param_key], int) if param_key == 'description': continue elif isinstance(params[param_key], bool): if isinstance(params[param_key], bool): param_widget = ParamCheckBox(param_key) val = params[param_key] param_widget.setChecked(val) Loading @@ -155,6 +154,11 @@ class ParamWidget(QWidget): size = CONFIG_COMBOBOX_MIDEAN else: size = CONFIG_COMBOBOX_SHORT if param_key == 'device' and 'hip' in param_dict['options']: param_dict['options'].remove('hip') if param_dict['select'] == 'hip': param_dict['select'] = DEFAULT_DEVICE param_widget = ParamComboBox(param_key, param_dict['options'], size=size, scrollWidget=scrollWidget) # if cuda is not available, disable combobox 'cuda' item Loading Loading @@ -264,10 +268,10 @@ class ModuleConfigParseWidget(QWidget): if widget is None: # lazy load widgets params = self.module_dict[module] param_widget = ParamWidget(params, scrollWidget=self) param_widget.paramwidget_edited.connect(self.paramwidget_edited) self.param_widget_map[module] = param_widget self.params_layout.addWidget(param_widget) widget = ParamWidget(params, scrollWidget=self) widget.paramwidget_edited.connect(self.paramwidget_edited) self.param_widget_map[module] = widget self.params_layout.addWidget(widget) else: widget.show() self.visibleWidget = widget Loading Loading
modules/base.py +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ from typing import Dict from utils.logger import logger as LOGGER import gc GPUINTENSIVE_SET = {'cuda', 'hip'} GPUINTENSIVE_SET = {'cuda'} class BaseModule: Loading
modules/inpaint/__init__.py +0 −2 Original line number Diff line number Diff line Loading @@ -145,7 +145,6 @@ class AOTInpainter(InpainterBase): 'options': [ 'cpu', 'cuda', 'hip' ], 'select': DEFAULT_DEVICE }, Loading Loading @@ -251,7 +250,6 @@ class LamaInpainterMPE(InpainterBase): 'options': [ 'cpu', 'cuda', 'hip' ], 'select': DEFAULT_DEVICE } Loading
modules/ocr/__init__.py +0 −3 Original line number Diff line number Diff line Loading @@ -89,7 +89,6 @@ class OCRMIT32px(OCRBase): 'options': [ 'cpu', 'cuda', 'hip' ], 'select': DEFAULT_DEVICE }, Loading Loading @@ -138,7 +137,6 @@ class MangaOCR(OCRBase): 'options': [ 'cpu', 'cuda', 'hip' ], 'select': DEFAULT_DEVICE } Loading Loading @@ -209,7 +207,6 @@ class OCRMIT48pxCTC(OCRBase): 'options': [ 'cpu', 'cuda', 'hip' ], 'select': DEFAULT_DEVICE }, Loading
modules/textdetector/__init__.py +0 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,6 @@ class ComicTextDetector(TextDetectorBase): 'options': [ 'cpu', 'cuda', 'hip' ], 'select': DEFAULT_DEVICE }, Loading
ui/dlconfig_parse_widgets.py +13 −9 Original line number Diff line number Diff line Loading @@ -126,15 +126,14 @@ class ParamWidget(QWidget): param_layout.setContentsMargins(0, 0, 0, 0) param_layout.setSpacing(14) for param_key in params: param_label = ParamNameLabel(param_key) if param_key == 'description': continue param_label = ParamNameLabel(param_key) is_str = isinstance(params[param_key], str) is_digital = isinstance(params[param_key], float) or isinstance(params[param_key], int) if param_key == 'description': continue elif isinstance(params[param_key], bool): if isinstance(params[param_key], bool): param_widget = ParamCheckBox(param_key) val = params[param_key] param_widget.setChecked(val) Loading @@ -155,6 +154,11 @@ class ParamWidget(QWidget): size = CONFIG_COMBOBOX_MIDEAN else: size = CONFIG_COMBOBOX_SHORT if param_key == 'device' and 'hip' in param_dict['options']: param_dict['options'].remove('hip') if param_dict['select'] == 'hip': param_dict['select'] = DEFAULT_DEVICE param_widget = ParamComboBox(param_key, param_dict['options'], size=size, scrollWidget=scrollWidget) # if cuda is not available, disable combobox 'cuda' item Loading Loading @@ -264,10 +268,10 @@ class ModuleConfigParseWidget(QWidget): if widget is None: # lazy load widgets params = self.module_dict[module] param_widget = ParamWidget(params, scrollWidget=self) param_widget.paramwidget_edited.connect(self.paramwidget_edited) self.param_widget_map[module] = param_widget self.params_layout.addWidget(param_widget) widget = ParamWidget(params, scrollWidget=self) widget.paramwidget_edited.connect(self.paramwidget_edited) self.param_widget_map[module] = widget self.params_layout.addWidget(widget) else: widget.show() self.visibleWidget = widget Loading