Ill-Ness commited on
Commit
a33d5a7
·
verified ·
1 Parent(s): cc5f2f0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -28
README.md CHANGED
@@ -9,7 +9,6 @@ library_name: diffusers
9
  tags:
10
  - text-to-image
11
  - image-editing
12
- - flux
13
  - diffusion-single-file
14
  - vae
15
  - decoder
@@ -19,15 +18,15 @@ tags:
19
 
20
  ![Comparison Panel](./comparison_panel.jpeg)
21
 
22
- `Rift.1-decoder` is a FLUX-compatible VAE decoder made for the Rift model line. It is designed as a **drop-in decoder component** for compatible FLUX.2-style Diffusers pipelines that use `AutoencoderKLFlux2`. The encoder path remains compatible with FLUX-style latent encoding, while the decoder has been trained as the Rift image reconstruction component.
23
 
24
  The exported Diffusers runtime class remains `AutoencoderKLFlux2` for loader compatibility. The model metadata identifies the architecture as `Rift1Decoder` with model type `rift1_decoder`.
25
 
26
  # **Key Features**
27
 
28
- 1. **FLUX-compatible decoder interface** using `AutoencoderKLFlux2`.
29
  2. **Rift1Decoder metadata** in `config.json` for clear model identity.
30
- 3. **32 latent channels** for compatibility with FLUX.2-style latent spaces.
31
  4. **512px reconstruction training** with edge and frequency losses for sharper detail retention.
32
  5. **Single-file artifacts included** for decoder-focused workflows:
33
  - `diffusion_pytorch_model.safetensors`
@@ -37,11 +36,7 @@ The exported Diffusers runtime class remains `AutoencoderKLFlux2` for loader com
37
 
38
  Compatible target pipeline family:
39
 
40
- - FLUX.2-style Diffusers pipelines using `AutoencoderKLFlux2`
41
- - [FLUX.2-klein-4B](https://huggingface.co/black-forest-labs/FLUX.2-klein-4B)
42
- - [FLUX.2-klein-9B](https://huggingface.co/black-forest-labs/FLUX.2-klein-9B)
43
- - [FLUX.2-klein-9b-kv](https://huggingface.co/black-forest-labs/FLUX.2-klein-9b-kv)
44
- - [FLUX.2-dev](https://huggingface.co/black-forest-labs/FLUX.2-dev)
45
 
46
  # **Comparison**
47
 
@@ -69,33 +64,21 @@ vae = AutoencoderKLFlux2.from_pretrained(
69
  )
70
  ```
71
 
72
- If using a compatible FLUX.2 pipeline, pass this VAE when loading the pipeline:
73
 
74
  ```python
75
  import torch
76
- from diffusers import Flux2KleinPipeline, AutoencoderKLFlux2
77
 
78
  device = "cuda"
79
  dtype = torch.bfloat16
80
 
81
- vae = AutoencoderKLFlux2.from_pretrained("Rift-ai/Rift.1-decoder", torch_dtype=dtype)
82
- pipe = Flux2KleinPipeline.from_pretrained(
83
- "black-forest-labs/FLUX.2-klein-4B",
84
- vae=vae,
85
  torch_dtype=dtype,
86
- )
87
- pipe.enable_model_cpu_offload()
88
-
89
- prompt = "A black cat holding a sign that says 'hello world' in typewriter font"
90
- image = pipe(
91
- prompt=prompt,
92
- height=1024,
93
- width=1024,
94
- guidance_scale=1.0,
95
- num_inference_steps=4,
96
- generator=torch.Generator(device=device).manual_seed(0),
97
- ).images[0]
98
- image.save("rift-decoder-output.png")
99
  ```
100
 
101
  ---
 
9
  tags:
10
  - text-to-image
11
  - image-editing
 
12
  - diffusion-single-file
13
  - vae
14
  - decoder
 
18
 
19
  ![Comparison Panel](./comparison_panel.jpeg)
20
 
21
+ `Rift.1-decoder` is a VAE decoder made for the Rift model line. It is designed as a **drop-in decoder component** for compatible Diffusers image pipelines that use `AutoencoderKLFlux2`. The decoder has been trained as the Rift image reconstruction component.
22
 
23
  The exported Diffusers runtime class remains `AutoencoderKLFlux2` for loader compatibility. The model metadata identifies the architecture as `Rift1Decoder` with model type `rift1_decoder`.
24
 
25
  # **Key Features**
26
 
27
+ 1. **Diffusers decoder interface** using `AutoencoderKLFlux2`.
28
  2. **Rift1Decoder metadata** in `config.json` for clear model identity.
29
+ 3. **32 latent channels** for compatible image latent spaces.
30
  4. **512px reconstruction training** with edge and frequency losses for sharper detail retention.
31
  5. **Single-file artifacts included** for decoder-focused workflows:
32
  - `diffusion_pytorch_model.safetensors`
 
36
 
37
  Compatible target pipeline family:
38
 
39
+ - Diffusers image pipelines using `AutoencoderKLFlux2`
 
 
 
 
40
 
41
  # **Comparison**
42
 
 
64
  )
65
  ```
66
 
67
+ If using a compatible image pipeline, pass this VAE when loading the pipeline:
68
 
69
  ```python
70
  import torch
71
+ from diffusers import AutoencoderKLFlux2
72
 
73
  device = "cuda"
74
  dtype = torch.bfloat16
75
 
76
+ vae = AutoencoderKLFlux2.from_pretrained(
77
+ "Rift-ai/Rift.1-decoder",
 
 
78
  torch_dtype=dtype,
79
+ ).to(device)
80
+
81
+ # Pass `vae=vae` into a compatible Diffusers image pipeline.
 
 
 
 
 
 
 
 
 
 
82
  ```
83
 
84
  ---