From fdaa1c6b7bcff904c54c57c3e1b4825f9d7b809a Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 8 May 2024 21:10:05 -0400 Subject: [PATCH] fix model detect --- CHANGELOG.md | 1 + TODO.md | 1 + modules/control/units/detect.py | 5 +++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36dbf80ac..e6960c129 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -120,6 +120,7 @@ it is time to give credit to original [author](https://github.com/auTOMATIC1111) - Updated all system requirements - UI log monitor will auto-reconnect to server on server restart - UI styles includes indicator for active styles + - Secondary sampler add option "same as primary" - Support controlnet manually downloads models in both standalone and diffusers format For standalone, simply copy safetensors file to `models/control/controlnet` folder For diffusers format, create folder with model name in `models/control/controlnet/` diff --git a/TODO.md b/TODO.md index 1c3004f31..6e93637db 100644 --- a/TODO.md +++ b/TODO.md @@ -15,6 +15,7 @@ Main ToDo list can be found at [GitHub projects](https://github.com/users/vladma ### Features - hidiffusion img2img: +- animatediff-sdxl - async lowvram: - fp8: - init latents: variations, img2img diff --git a/modules/control/units/detect.py b/modules/control/units/detect.py index 5d6875b28..f4d7c4cb6 100644 --- a/modules/control/units/detect.py +++ b/modules/control/units/detect.py @@ -9,5 +9,6 @@ def is_sd15(model): def is_sdxl(model): if model is None: return False - return model.__name__ == p.StableDiffusionXLPipeline.__name__ or model.__name__ == p.StableDiffusionXLImg2ImgPipeline.__name__ or model.__name__ == p.StableDiffusionXLInpaintPipeline.__name__ - # return isinstance(model, p.StableDiffusionXLPipeline) or isinstance(model, p.StableDiffusionXLImg2ImgPipeline) or isinstance(model, p.StableDiffusionXLInpaintPipeline) + if hasattr(model, '__name__'): + return model.__name__ == p.StableDiffusionXLPipeline.__name__ or model.__name__ == p.StableDiffusionXLImg2ImgPipeline.__name__ or model.__name__ == p.StableDiffusionXLInpaintPipeline.__name__ + return isinstance(model, p.StableDiffusionXLPipeline) or isinstance(model, p.StableDiffusionXLImg2ImgPipeline) or isinstance(model, p.StableDiffusionXLInpaintPipeline)