Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(backend) installed models being redownloaded #5526

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions invokeai/backend/install/model_install_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,16 @@ def heuristic_import(

def _remove_installed(self, model_list: List[str]):
all_models = self.all_models()
models_to_remove = []

for path in model_list:
key = self.reverse_paths.get(path)
if key and all_models[key].installed:
logger.warning(f"{path} already installed. Skipping.")
model_list.remove(path)
models_to_remove.append(path)

for path in models_to_remove:
logger.warning(f"{path} already installed. Skipping")
model_list.remove(path)

def _add_required_models(self, model_list: List[str]):
additional_models = []
Expand Down