mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2025-01-07 03:17:05 +08:00
ruff format
This commit is contained in:
parent
a4bed7aee3
commit
26edc71268
@ -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)."""
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user