This commit is contained in:
lllyasviel 2024-01-29 18:07:16 -08:00
parent 95737eac9e
commit e34f4cdd9c
5 changed files with 10 additions and 10 deletions

View File

@ -536,7 +536,7 @@ class PreprocessorNormalBae(Preprocessor):
super().__init__()
self.name = 'normalbae'
self.tags = ['NormalMap']
self.model_filename_filers = ['normal']
self.model_filename_filters = ['normal']
self.slider_resolution = PreprocessorParameter(
label='Resolution', minimum=128, maximum=2048, value=512, step=8, visible=True)
self.slider_1 = PreprocessorParameter(visible=False)

View File

@ -58,11 +58,11 @@ class LegacyPreprocessor(Preprocessor):
'openpose': ['openpose', 'densepose'],
}
self.model_filename_filers = []
self.model_filename_filters = []
for tag in self.tags:
tag_lower = tag.lower()
self.model_filename_filers.append(tag_lower)
self.model_filename_filers += filters_aliases.get(tag_lower, [])
self.model_filename_filters.append(tag_lower)
self.model_filename_filters += filters_aliases.get(tag_lower, [])
if legacy_dict['resolution'] is None:
self.resolution = PreprocessorParameter(visible=False)

View File

@ -18,7 +18,7 @@ class PreprocessorNormalBae(Preprocessor):
super().__init__()
self.name = 'normalbae'
self.tags = ['NormalMap']
self.model_filename_filers = ['normal']
self.model_filename_filters = ['normal']
self.slider_resolution = PreprocessorParameter(
label='Resolution', minimum=128, maximum=2048, value=512, step=8, visible=True)
self.slider_1 = PreprocessorParameter(visible=False)

View File

@ -100,10 +100,10 @@ def get_filtered_preprocessor_names(tag):
def get_filtered_controlnet_names(tag):
filtered_preprocessors = get_filtered_preprocessors(tag)
model_filename_filers = []
model_filename_filters = []
for p in filtered_preprocessors.values():
model_filename_filers += p.model_filename_filers
return [x for x in controlnet_names if any(f.lower() in x.lower() for f in model_filename_filers) or x == 'None']
model_filename_filters += p.model_filename_filters
return [x for x in controlnet_names if any(f.lower() in x.lower() for f in model_filename_filters) or x == 'None']
def update_controlnet_filenames():

View File

@ -18,7 +18,7 @@ class Preprocessor:
def __init__(self):
self.name = 'PreprocessorBase'
self.tags = []
self.model_filename_filers = []
self.model_filename_filters = []
self.slider_resolution = PreprocessorParameter(label='Resolution', minimum=128, maximum=2048, value=512, step=8, visible=True)
self.slider_1 = PreprocessorParameter()
self.slider_2 = PreprocessorParameter()
@ -80,7 +80,7 @@ class PreprocessorCanny(Preprocessor):
super().__init__()
self.name = 'canny'
self.tags = ['Canny']
self.model_filename_filers = ['canny']
self.model_filename_filters = ['canny']
self.slider_1 = PreprocessorParameter(minimum=0, maximum=256, step=1, value=100, label='Low Threshold', visible=True)
self.slider_2 = PreprocessorParameter(minimum=0, maximum=256, step=1, value=200, label='High Threshold', visible=True)
self.sorting_priority = 100