only auto switch to lcm schduler when using lcm lora

This commit is contained in:
Qing 2024-02-10 16:41:54 +08:00
parent 950fc4ce53
commit c03a1918e7

View File

@ -395,7 +395,7 @@ class DiffusionInpaintModel(InpaintModel):
def set_scheduler(self, config: InpaintRequest):
scheduler_config = self.model.scheduler.config
sd_sampler = config.sd_sampler
if config.sd_lcm_lora:
if config.sd_lcm_lora and self.model_info.support_lcm_lora:
sd_sampler = SDSampler.lcm
logger.info(f"LCM Lora enabled, use {sd_sampler} sampler")
scheduler = get_scheduler(sd_sampler, scheduler_config)