stable-diffusion-webui-model-toolkit  by arenasys

Toolkit for Stable Diffusion model management

Created 2 years ago
532 stars

Top 59.5% on SourcePulse

GitHubView on GitHub
Project Summary

This toolkit addresses the need for efficient management, editing, and creation of Stable Diffusion models, targeting users who want to optimize model size, debug loading issues, or combine model components. It offers a user-friendly interface within the popular stable-diffusion-webui for tasks like VAE integration, component extraction, and model pruning, ultimately reducing storage footprint and improving usability.

How It Works

The toolkit operates by dissecting Stable Diffusion models into their core components: VAE, UNET, and CLIP. It allows users to import, export, and replace these components, enabling the creation of standalone models or the debugging of compatibility issues. A key feature is its "metric" system, which attempts to identify model components (like specific VAEs) even when renamed, aiding in the discovery of underlying model origins and potential optimizations.

Quick Start & Requirements

  • Install: Via the stable-diffusion-webui Extensions tab: Install from URL > Paste https://github.com/arenasys/stable-diffusion-webui-model-toolkit > Install.
  • Prerequisites: stable-diffusion-webui (AUTOMATIC1111's fork).
  • Resources: Model operations can be resource-intensive depending on model size.

Highlighted Details

  • Reduces model size significantly (e.g., 7.7GB + 800MB VAE to 2.1GB standalone).
  • Identifies and allows replacement of model components (VAE, UNET, CLIP) for debugging and optimization.
  • Features an "Autopruning" option to automatically convert models to FP16 .safetensor format on WebUI startup.
  • Includes a "metric" system to identify model components even when renamed, helping to detect common VAEs like NAI VAE.

Maintenance & Community

  • Project maintained by arenasys.
  • No explicit community links (Discord/Slack) or roadmap mentioned in the README.

Licensing & Compatibility

  • License not explicitly stated in the README.
  • Designed as an extension for stable-diffusion-webui, implying compatibility with its ecosystem.

Limitations & Caveats

  • The "metric" system for component identification is not foolproof and can lead to incorrect matches.
  • Merging different VAEs can result in broken outputs due to latent space incompatibilities.
  • The "Fix broken CLIP position IDs" option is off by default as it slightly alters model output.
Health Check
Last Commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
2 stars in the last 30 days

Explore Similar Projects

Starred by Jeremy Howard Jeremy Howard(Cofounder of fast.ai) and Stas Bekman Stas Bekman(Author of "Machine Learning Engineering Open Book"; Research Engineer at Snowflake).

SwissArmyTransformer by THUDM

0.5%
1k
Transformer library for flexible model development
Created 4 years ago
Updated 10 months ago
Feedback? Help us improve.