-
Notifications
You must be signed in to change notification settings - Fork 11.4k
Add most basic Asset support for models #11315
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
Conversation
…and register_assets_system without adding anything to the DB or server routes yet, for now making everything sync (can introduce async once everything is cleaned up and brought over)
…(models) now get added/rescanned
…/assets/hash/<hash> and PUT /api/assets/<id>/preview
|
Since this merge, ComfyUI fails to start for me with the error |
|
@Leseratte10 Now that's new - thank you for the report! I'd love to get more info about your ComfyUI install in order to track down a fix. If you're familiar with the terminal/ComfyUI, could you enter your ComfyUI's venv and run |
|
Thanks for the quick response, here's the output of "pip freeze": Versions |
At its core, this PR is a super small slice of this one: #10045
A fast scan of model files occurs upon startup and calling the /object_info endpoint. No hashing happens at this point in time.
Only 3 http endpoints are added:
Adds an assets database with tag support that fully reflects the work done in the previous assets PR, enabling more functionality to be added as needed without modifying database schema.
Adds an unused hashing function that uses blake3, has support for resuming hashing from midway into a file, and can accept either an absolute path as input or an open file reference.
Note: since the hashing is not enabled, requirements.txt is not updated to add
blake3as a dependency in this PR.Adding tests would make sense. The ones in the original PR are very verbose and I have not translated them yet to be in this PR.