diff --git a/ldm/modules/textual_inversion_manager.py b/ldm/modules/textual_inversion_manager.py index f7ced79a52..e2e9b25c27 100644 --- a/ldm/modules/textual_inversion_manager.py +++ b/ldm/modules/textual_inversion_manager.py @@ -66,8 +66,9 @@ class TextualInversionManager(): self._add_textual_inversion(embedding_info['name'], embedding_info['embedding'], defer_injecting_tokens=defer_injecting_tokens) - except ValueError: - print(f' | ignoring incompatible embedding {embedding_info["name"]}') + except ValueError as e: + print(f' | Ignoring incompatible embedding {embedding_info["name"]}') + print(f' | The error was {str(e)}') else: print(f'>> Failed to load embedding located at {ckpt_path}. Unsupported file.') @@ -151,7 +152,8 @@ class TextualInversionManager(): try: self._inject_tokens_and_assign_embeddings(ti) except ValueError as e: - print(f' | ignoring incompatible embedding trigger {ti.trigger_string}') + print(f' | Ignoring incompatible embedding trigger {ti.trigger_string}') + print(f' | The error was {str(e)}') continue injected_token_ids.append(ti.trigger_token_id) injected_token_ids.extend(ti.pad_token_ids) diff --git a/scripts/textual_inversion_fe.py b/scripts/textual_inversion_fe.py index 4e31812f09..0bde21c95c 100755 --- a/scripts/textual_inversion_fe.py +++ b/scripts/textual_inversion_fe.py @@ -219,7 +219,7 @@ class textualInversionForm(npyscreen.FormMultiPageAction): def get_model_names(self)->(List[str],int): conf = OmegaConf.load(os.path.join(Globals.root,'configs/models.yaml')) - model_names = list(conf.keys()) + model_names = sorted(list(conf.keys())) defaults = [idx for idx in range(len(model_names)) if 'default' in conf[model_names[idx]]] return (model_names,defaults[0])