invoke-ai / InvokeAI

Invoke is a leading creative engine for Stable Diffusion models, empowering professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry leading WebUI, and serves as the foundation for multiple commercial products.
https://invoke-ai.github.io/InvokeAI/
Apache License 2.0
23.8k stars 2.45k forks source link

fix: Avoid downloading unsafe .bin files if a safetensors file is ava… #7282

Closed brandonrising closed 3 weeks ago

brandonrising commented 3 weeks ago

…ilable

Summary

Currently, if we don't detect any variants in a hf repo, we just download everything. This PR is an attempt to start avoiding downloading .bin files when we detect that a safetensors file is available in the same directory.

QA Instructions

Install facebook/sam-vit-large and ensure the .bin file is not downloaded and the model still functions properly. Attempt to install mohsen2/pytorch_model.bin or a similar hf repo with only .bin files and ensure the .bin is downloaded properly

Merge Plan

Can be merged when approved

Checklist