one more fix for requires_aesthetics_score

This commit is contained in:
Vladimir Mandic
2024-06-22 08:35:18 -04:00
parent bbaec29720
commit e4a8919ca1
2 changed files with 11 additions and 8 deletions
+2
View File
@@ -516,6 +516,8 @@ def switch_class(p: StableDiffusionProcessing, new_class: type, dct: dict = None
for k, v in dct.items():
if k in possible:
kwargs[k] = v
if new_class == StableDiffusionProcessingTxt2Img:
sd_models.clean_diffuser_pipe(shared.sd_model)
debug(f"Switching class: {p.__class__.__name__} -> {new_class.__name__} fn={sys._getframe(1).f_code.co_name}") # pylint: disable=protected-access
p.__class__ = new_class
p.__init__(**kwargs)