Conversation
bigcat88
left a comment
There was a problem hiding this comment.
From quick look:
- Can we use
SUPPORTED_PT_EXTENSIONSvariable? - If two subdirectories have files with the same name (e.g., vae/config.json and text_encoders/config.json), only one will be in the dict. When deleting by name, the wrong file could be deleted.
- Minor thing:
rglob()finds files at arbitrary depth, not just immediate children. This might find models in nested subdirs liketext_encoders/subfolder/model.safetensors/
I will make the change. I did not notice the variable. Thanks.
Thanks for the catch. Let me make sure that does not happen (and if that case happens, to offer them an option to pick which one to delete, or qualify the folder)
Good point. Given the risk of finding things not desired (and the reason I started this was to find the usual first-level children of models, where most things go), maybe a different (better?) approach would be to use a |
|
I updated the delete to take into consideration multiple matching names: If picking from the menu: Or specifying in the command line: In case of multiple matches, you can specify which one more specifically: |
|
Implemented Default: Restricting further: |
Hi @bigcat88, I updated the code to address your feedback. PTAL at your convenience. Examples of the code in action as comments above. |
Implements a fix for issue #361 and also looks for
models/subdirectories. Example output:It also honors the folders when removing modules.