mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-04-24 00:09:21 +00:00
clear GenerationParametersList before batch
clears any generation parameters that are with the attribute to_be_clear_before_batch = True prevent buildup of some parameters
This commit is contained in:
@@ -308,9 +308,17 @@ class GenerationParametersList(list):
|
||||
if return str, the value will be written to infotext, if return None will be ignored.
|
||||
"""
|
||||
|
||||
def __init__(self, *args, to_be_clear_before_batch=True, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self._to_be_clear_before_batch = to_be_clear_before_batch
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
return ', '.join(sorted(set(self), key=natural_sort_key))
|
||||
|
||||
@property
|
||||
def to_be_clear_before_batch(self):
|
||||
return self._to_be_clear_before_batch
|
||||
|
||||
def __add__(self, other):
|
||||
if isinstance(other, GenerationParametersList):
|
||||
return self.__class__([*self, *other])
|
||||
|
||||
Reference in New Issue
Block a user