An open API service indexing awesome lists of open source software.

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

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
```