ruff format

This commit is contained in:
Ryan Dick 2024-12-17 00:44:20 +00:00 committed by Kent Keirsey
parent a4bed7aee3
commit 26edc71268
2 changed files with 3 additions and 6 deletions

View File

@ -273,11 +273,13 @@ class LoRALyCORISConfig(LoRAConfigBase):
def get_tag() -> Tag:
return Tag(f"{ModelType.LoRA.value}.{ModelFormat.LyCORIS.value}")
class ControlAdapterConfigBase(BaseModel):
default_settings: Optional[ControlAdapterDefaultSettings] = Field(
description="Default settings for this model", default=None
)
class ControlLoRALyCORISConfig(ModelConfigBase, ControlAdapterConfigBase):
"""Model config for Control LoRA models."""
@ -321,9 +323,6 @@ class VAEDiffusersConfig(ModelConfigBase):
return Tag(f"{ModelType.VAE.value}.{ModelFormat.Diffusers.value}")
class ControlNetDiffusersConfig(DiffusersConfigBase, ControlAdapterConfigBase):
"""Model config for ControlNet models (diffusers version)."""

View File

@ -41,9 +41,7 @@ def test_repo_variant(datadir: Path):
def test_controlnet_t2i_default_settings():
assert get_default_settings_control_adapters("some_canny_model").preprocessor == "canny_image_processor"
assert (
get_default_settings_control_adapters("some_depth_model").preprocessor == "depth_anything_image_processor"
)
assert get_default_settings_control_adapters("some_depth_model").preprocessor == "depth_anything_image_processor"
assert get_default_settings_control_adapters("some_pose_model").preprocessor == "dw_openpose_image_processor"
assert get_default_settings_control_adapters("i like turtles") is None