Skip to content

[enhancement]: Command-line script to remove orphaned model files #51

@lstein

Description

@lstein

Is there an existing issue for this?

  • I have searched the existing issues

Contact Details

No response

What should this feature add?

I'd like a command-line script, located in scripts, which removes orphaned model files from the INVOKEAI_ROOT directory.

Orphaned models are ones that appear in the INVOKEAI_ROOT/models directory, but which are not referenced in the database models table. When run without command-line arguments, the script should list all the orphaned model directories it finds and ask for confirmation to delete them. Other arguments are:

--root       Specify an INVOKEAI_ROOT directory. The $INVOKEAI_ROOT environment variable also controls this.
--delete     Delete orphan model files without asking

Alternatives

No response

Additional Content

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions