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

[bug]: installed models being redownloaded #5525

Closed
1 task done
isNeil opened this issue Jan 17, 2024 · 0 comments · Fixed by #5526
Closed
1 task done

[bug]: installed models being redownloaded #5525

isNeil opened this issue Jan 17, 2024 · 0 comments · Fixed by #5526
Assignees
Labels
bug Something isn't working

Comments

@isNeil
Copy link
Contributor

isNeil commented Jan 17, 2024

Is there an existing issue for this?

  • I have searched the existing issues

OS

Linux

GPU

cuda

VRAM

No response

What version did you experience this issue on?

v3.6.0

What happened?

In InvokeAI/invokeai/backend/install/model_install_backend.py
function _remove_installed is expected to remove all already installed models from the model_list of models to be downloaded however some installed models are being "missed".

This is caused by the for loop modifying it's own iterable model_list.remove() which causes the loop to skip elements in the model_list.

As a result, some existing models are redundantly being redownloaded.

    def _remove_installed(self, model_list: List[str]):
        all_models = self.all_models()
        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)

Screenshots

No response

Additional context

No response

Contact Details

@NeilWng

@isNeil isNeil added the bug Something isn't working label Jan 17, 2024
@lstein lstein self-assigned this Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants