https://github.com/rockerboo/sd-ext
Scripts and extensions for Stable Diffusion
https://github.com/rockerboo/sd-ext
accelerate diffusers python pytorch stable-diffusion transformers
Last synced: about 1 year ago
JSON representation
Scripts and extensions for Stable Diffusion
- Host: GitHub
- URL: https://github.com/rockerboo/sd-ext
- Owner: rockerBOO
- License: mit
- Created: 2023-11-23T07:14:36.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-28T00:05:47.000Z (about 1 year ago)
- Last Synced: 2025-02-28T10:50:20.631Z (about 1 year ago)
- Topics: accelerate, diffusers, python, pytorch, stable-diffusion, transformers
- Language: Python
- Homepage:
- Size: 523 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# SD Extensions
- [SD Extensions](#sd-extensions)
- [Analysis](#analysis)
- [Pruning](#pruning)
- [Extracting](#extracting)
- [Convert](#convert)
- [Inference](#inference)
- [Metadata](#metadata)
- [Install](#install)
- [Install using venv virtual environment](#install-using-venv-virtual-environment)
- [Usage](#usage)
Script's I use with Stable Diffusion
## Analysis
- debug_vae_from_images.py
- clip_score.py
- clip_arch.py
- clip_embeddings.py
- clip_image_embeddings.py
- clip_iqa.py
- image_similarity.py
- check_norms.py
- fid.py
## Pruning
- scale_norms.py
- drop_keys.py
## Extracting
- extract_lora_block.py
## Convert
- convert_safetensors.py
- batch_bundle_convert.py
## Inference
- sdv.py
- sdxl-turbo.py
- wuerstechen.py
- moondream.py
- segmoe_run.py
- sd_dpo.py
## Metadata
- read-metadata.py
## Install
Recommended cloning into another repository to use their dependencies.
### Install using venv virtual environment
```bash
python -m venv venv
source ./venv/bin/activate # linux
call .\venv\Scripts\activate.bat # windows
# PyTorch. Get the version that works for your computer.
# https://pytorch.org/get-started/locally/
```
Pick A or B to install dependencies
### A) (Optional) Install dependencies using poetry [recommended]
```bash
poetry install
```
Then run with `poetry run`
```bash
poetry run python read-metadata.py myfile.safetensors
```
### B) (Optional) Install dependencies using PIP
```bash
pip install -r requirements.txt
```
## Usage
Script's should be setup for accelerate so launch the scripts like
```
accelerate launch check_norms.py
```
For each script check the help menu for how to use.
```
python check_norms.py --help
```