Instructions to use vladmandic/MicroDecoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use vladmandic/MicroDecoder with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("vladmandic/MicroDecoder", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Update README.md
Browse files
README.md
CHANGED
|
@@ -10,6 +10,8 @@ library_name: diffusers
|
|
| 10 |
Inference includes noise correction based on current timestep, intentional blurring plus upscale interpolation: all with intention of providing as fast-as-possible reconstruction that is viable and consistent with any noise levels.
|
| 11 |
Intended use-case is live-preview during generative model inference.
|
| 12 |
|
|
|
|
|
|
|
| 13 |
- Model definition and training code [here](https://github.com/vladmandic/sdnext/blob/dev/modules/vae/sd_vae_micro_train.py)
|
| 14 |
- Example inference code [here](https://github.com/vladmandic/sdnext/blob/dev/modules/vae/sd_vae_micro.py)
|
| 15 |
|
|
@@ -17,14 +19,19 @@ Example using **MicroDecoder** with `Flux.2-Klein-9B` and compared with official
|
|
| 17 |
|
| 18 |

|
| 19 |
|
| 20 |
-
##
|
| 21 |
|
| 22 |
```shell
|
| 23 |
-
sd_vae_micro_train.py
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
```
|
| 29 |
|
| 30 |
```log
|
|
@@ -41,5 +48,5 @@ Epoch | Train Tot | Tr PSNR | Tr SSIM | Val Tot | Val PSNR | Val SSIM | Val L1
|
|
| 41 |
350/350 | 2.3010 | 28.51 | 0.8511 | 0.9781 | 35.83 | 0.9734 | 0.0111 | 0.0278 *
|
| 42 |
|
| 43 |
Training complete! Best validation PSNR: 35.83 dB (Epoch 350)
|
| 44 |
-
Saved best EMA model weights to:
|
| 45 |
```
|
|
|
|
| 10 |
Inference includes noise correction based on current timestep, intentional blurring plus upscale interpolation: all with intention of providing as fast-as-possible reconstruction that is viable and consistent with any noise levels.
|
| 11 |
Intended use-case is live-preview during generative model inference.
|
| 12 |
|
| 13 |
+
Shapes/Channels/etc are inferred from the base VAE, so no configuration changes are needed between different models.
|
| 14 |
+
|
| 15 |
- Model definition and training code [here](https://github.com/vladmandic/sdnext/blob/dev/modules/vae/sd_vae_micro_train.py)
|
| 16 |
- Example inference code [here](https://github.com/vladmandic/sdnext/blob/dev/modules/vae/sd_vae_micro.py)
|
| 17 |
|
|
|
|
| 19 |
|
| 20 |

|
| 21 |
|
| 22 |
+
## Example
|
| 23 |
|
| 24 |
```shell
|
| 25 |
+
sd_vae_micro_train.py \
|
| 26 |
+
--dim 256 \
|
| 27 |
+
--epochs 350 \
|
| 28 |
+
--resolution 512 \
|
| 29 |
+
--scale 4 \
|
| 30 |
+
--lr 0.0003
|
| 31 |
+
--folder ~/generative/Input/vae/ \
|
| 32 |
+
--vae AutoencoderKLQwenImage21 \
|
| 33 |
+
--repo Qwen/Qwen-Image-2.1
|
| 34 |
+
--output MicroVAE-qwen21.safetensors
|
| 35 |
```
|
| 36 |
|
| 37 |
```log
|
|
|
|
| 48 |
350/350 | 2.3010 | 28.51 | 0.8511 | 0.9781 | 35.83 | 0.9734 | 0.0111 | 0.0278 *
|
| 49 |
|
| 50 |
Training complete! Best validation PSNR: 35.83 dB (Epoch 350)
|
| 51 |
+
Saved best EMA model weights to: MicroVAE-qwen21.safetensors
|
| 52 |
```
|