initial lightweight animatediff

This commit is contained in:
Vladimir Mandic
2023-11-28 19:30:10 -05:00
parent c2f8e8cc30
commit d8d8f58072
11 changed files with 217 additions and 36 deletions
+2 -2
View File
@@ -385,8 +385,8 @@ def process_diffusers(p: StableDiffusionProcessing, seeds, prompts, negative_pro
def update_sampler(sd_model, second_pass=False):
sampler_selection = p.latent_sampler if second_pass else p.sampler_name
is_karras_compatible = sd_model.__class__.__init__.__annotations__.get("scheduler", None) == diffusers.schedulers.scheduling_utils.KarrasDiffusionSchedulers
if hasattr(sd_model, 'scheduler') and sampler_selection != 'Default' and is_karras_compatible:
# is_karras_compatible = sd_model.__class__.__init__.__annotations__.get("scheduler", None) == diffusers.schedulers.scheduling_utils.KarrasDiffusionSchedulers
if hasattr(sd_model, 'scheduler') and sampler_selection != 'Default':
sampler = sd_samplers.all_samplers_map.get(sampler_selection, None)
if sampler is None:
sampler = sd_samplers.all_samplers_map.get("UniPC")