(self)
| 19 | |
| 20 | class Preprocessor: |
| 21 | def __init__(self): |
| 22 | self.name = 'PreprocessorBase' |
| 23 | self.tags = [] |
| 24 | self.model_filename_filters = [] |
| 25 | self.slider_resolution = PreprocessorParameter(label='Resolution', minimum=128, maximum=2048, value=512, step=8, visible=True) |
| 26 | self.slider_1 = PreprocessorParameter() |
| 27 | self.slider_2 = PreprocessorParameter() |
| 28 | self.slider_3 = PreprocessorParameter() |
| 29 | self.model_patcher: ModelPatcher = None |
| 30 | self.show_control_mode = True |
| 31 | self.do_not_need_model = False |
| 32 | self.sorting_priority = 0 # higher goes to top in the list |
| 33 | self.corp_image_with_a1111_mask_when_in_img2img_inpaint_tab = True |
| 34 | self.fill_mask_with_one_when_resize_and_fill = False |
| 35 | self.use_soft_projection_in_hr_fix = False |
| 36 | self.expand_mask_when_resize_and_fill = False |
| 37 | |
| 38 | def setup_model_patcher(self, model, load_device=None, offload_device=None, dtype=torch.float32, **kwargs): |
| 39 | if load_device is None: |
no test coverage detected