From 429f87c60b3ce50b5b28cb2a1f9366a340455bc9 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Tue, 19 Mar 2024 15:54:18 +1100 Subject: [PATCH] fix(mm): HFModelSource string format The dunder `__str__` method for `HFModelSource` was appending a colon `:` to the end of the source strings. --- invokeai/app/services/model_install/model_install_base.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/invokeai/app/services/model_install/model_install_base.py b/invokeai/app/services/model_install/model_install_base.py index b7385495e5..0c44571eee 100644 --- a/invokeai/app/services/model_install/model_install_base.py +++ b/invokeai/app/services/model_install/model_install_base.py @@ -114,8 +114,10 @@ class HFModelSource(StringLikeSource): def __str__(self) -> str: """Return string version of repoid when string rep needed.""" base: str = self.repo_id - base += f":{self.variant or ''}" - base += f":{self.subfolder}" if self.subfolder else "" + if self.variant: + base += f":{self.variant or ''}" + if self.subfolder: + base += f":{self.subfolder}" return base