Skip to content

rockerBOO/lora-inspector-rs

Repository files navigation

LoRA Inspector

LoRA Inspector Logo

A comprehensive tool for inspecting LoRA (Low-Rank Adaptation) files for machine learning models, particularly Stable Diffusion. c2182030-8b1f-4eff-8007-3feafa60b577
block-weight-norms

See the different blocks of the different networks. Ideally uses the more common format but↵ still good to see how the weights are effectively. We use Frobenius norm for the magnitude↵ and a vector norm for the strength.

lora-network-module-metadata

learning-rate-metadata

See the different settings for the LoRA file. What model it was trained on. Any VAE. Networ↵ k Dim/Rank and Alpha. Learning rates. Optimizer settings, learning rate schedulers.

epoch-dataset-steps

Dataset with buckets. Bucket resolutions.

dataset-subset-metadata

Subsets showing the different subset datasets, image augments, captions.

c2182030-8b1f-4eff-8007-3feafa60b577

Features

  • Browser-based LoRA file inspection
  • Detailed metadata analysis
  • Weight and network characteristic visualization
  • WebAssembly-powered performance
  • No external dependencies (like torch or python)

Project Structure

  • crates/: Project sub-modules
    • inspector/: Core Rust library
    • lora-inspector-wasm/: WebAssembly web frontend
    • lora-inspector/: CLI application

Technologies

  • Rust
  • WebAssembly
  • React
  • Vite
  • Candle (machine learning library)

Testing Strategy

Test Frameworks

  • lora-inspector-wasm:
    • AVA (JavaScript unit tests)
    • Playwright (E2E testing)
  • inspector: Rust built-in test module
  • lora-inspector: Limited test coverage

Test Coverage

  • Unit tests for key parsing
  • E2E browser testing
  • Metadata validation
  • Cross-browser compatibility

Getting Started

Prerequisites

  • Rust toolchain
  • Node.js
  • Yarn 4.9.1+
  • wasm-pack

Installation

# Clone the repository
git clone https://github.com/rockerBOO/lora-inspector-rs.git

# Navigate to the project directory
cd lora-inspector-rs

# Install dependencies for web frontend
cd crates/lora-inspector-wasm
yarn install --immutable

Development

# Start development server
make dev-wasm

# Build the project
make build

# Run tests
make test

Crate-Specific Documentation

Contributing

Contributions are welcome! Please check individual crate READMEs for specific guidelines.

Current Roadmap

  • WebAssembly frontend
  • Add LR Warmup metadata support
  • Improve weight visualization
  • Expand metadata parsing capabilities
  • Increase test coverage

License

MIT License - See LICENSE file

Acknowledgements

  • Inspired by the need for better LoRA model inspection tools
  • Built with passion for machine learning and open-source development

About

Rust version of LoRA inspector (wasm and binary) for Stable Diffusion

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published