diff --git a/CHANGELOG.md b/CHANGELOG.md index 41d4153e0..17ba58a3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,7 @@ - **API** - Add `/sdapi/v1/lora?lora=` endpoint that returns full lora info and metadata - Add `/sdapi/v1/controlnets?model_type=` endpoints that returns list of available controlnets for specific model type + - Set default sampler to `Default` - **Fixes** - IPEX with DPM2++ FlowMatch samplers - Invalid attention processor with ControlNet diff --git a/modules/api/control.py b/modules/api/control.py index 9d6512cd2..9e06d874a 100644 --- a/modules/api/control.py +++ b/modules/api/control.py @@ -22,7 +22,7 @@ ReqControl = models.create_model_from_signature( func = run.control_run, model_name = "StableDiffusionProcessingControl", additional_fields = [ - {"key": "sampler_name", "type": str, "default": "UniPC"}, + {"key": "sampler_name", "type": str, "default": "Default"}, {"key": "script_name", "type": Optional[str], "default": None}, {"key": "script_args", "type": list, "default": []}, {"key": "send_images", "type": bool, "default": True}, diff --git a/modules/api/models.py b/modules/api/models.py index f463a2dd6..a19c59858 100644 --- a/modules/api/models.py +++ b/modules/api/models.py @@ -198,7 +198,7 @@ ReqTxt2Img = PydanticModelGenerator( StableDiffusionProcessingTxt2Img, [ {"key": "sampler_index", "type": Union[int, str], "default": 0}, - {"key": "sampler_name", "type": str, "default": "UniPC"}, + {"key": "sampler_name", "type": str, "default": "Default"}, {"key": "hr_sampler_name", "type": str, "default": "Same as primary"}, {"key": "script_name", "type": Optional[str], "default": "none"}, {"key": "script_args", "type": list, "default": []}, diff --git a/modules/processing_class.py b/modules/processing_class.py index fc697d997..98e8d1c96 100644 --- a/modules/processing_class.py +++ b/modules/processing_class.py @@ -463,8 +463,8 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing): if all_subseeds is not None: self.all_subseeds = all_subseeds - if self.sampler_name == "PLMS": - self.sampler_name = 'UniPC' + if self.sampler_name == 'PLMS': + self.sampler_name = 'Default' if not shared.native: self.sampler = sd_samplers.create_sampler(self.sampler_name, self.sd_model) if hasattr(self.sampler, "initialize"): diff --git a/modules/processing_helpers.py b/modules/processing_helpers.py index e31ebb028..5d1647f8f 100644 --- a/modules/processing_helpers.py +++ b/modules/processing_helpers.py @@ -97,10 +97,10 @@ def get_sampler_name(sampler_index: int, img: bool = False) -> str: if len(sd_samplers.samplers) > sampler_index: sampler_name = sd_samplers.samplers[sampler_index].name else: - sampler_name = "UniPC" + sampler_name = "Default" shared.log.warning(f'Sampler not found: index={sampler_index} available={[s.name for s in sd_samplers.samplers]} fallback={sampler_name}') if img and sampler_name == "PLMS": - sampler_name = "UniPC" + sampler_name = "Default" shared.log.warning(f'Sampler not compatible: name=PLMS fallback={sampler_name}') return sampler_name