Image-to-Image
Diffusers
Safetensors
Diffusion Single File
English
rift1_decoder
text-to-image
image-editing
decoder
Instructions to use Rift-ai/Rift.1-decoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Rift-ai/Rift.1-decoder with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Rift-ai/Rift.1-decoder", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Diffusion Single File
How to use Rift-ai/Rift.1-decoder with Diffusion Single File:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
| license: other | |
| license_name: rift-non-commercial-license-v1.0 | |
| license_link: https://huggingface.co/Rift-ai/Rift.1-decoder/blob/main/LICENSE.md | |
| language: | |
| - en | |
| pipeline_tag: image-to-image | |
| library_name: diffusers | |
| tags: | |
| - text-to-image | |
| - image-editing | |
| - diffusion-single-file | |
| - decoder | |
|  | |
| `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. | |
| The exported Diffusers runtime class remains `AutoencoderKLFlux2` for loader compatibility. The model metadata identifies the architecture as `Rift1Decoder` with model type `rift1_decoder`. | |
| # **Key Features** | |
| 1. **Diffusers decoder interface** using `AutoencoderKLFlux2`. | |
| 2. **Rift1Decoder metadata** in `config.json` for clear model identity. | |
| 3. **32 latent channels** for compatible image latent spaces. | |
| 4. **512px reconstruction training** with edge and frequency losses for sharper detail retention. | |
| 5. **Single-file artifacts included** for decoder-focused workflows: | |
| - `diffusion_pytorch_model.safetensors` | |
| - `full_encoder_small_decoder.safetensors` | |
| - `small_decoder.safetensors` | |
| 6. Released under the **Rift Non-Commercial License v1.0**. | |
| Compatible target pipeline family: | |
| - Diffusers image pipelines using `AutoencoderKLFlux2` | |
| # **Comparison** | |
| | Reference Decoder | Rift1Decoder | | |
| |:---:|:---:| | |
| |  |  | | |
| # **Detail View** | |
|  | |
| # **Usage** | |
| ```shell | |
| pip install git+https://github.com/huggingface/diffusers.git transformers accelerate torch | |
| ``` | |
| ```python | |
| import torch | |
| from diffusers import AutoencoderKLFlux2 | |
| vae = AutoencoderKLFlux2.from_pretrained( | |
| "Rift-ai/Rift.1-decoder", | |
| torch_dtype=torch.bfloat16, | |
| ) | |
| ``` | |
| If using a compatible image pipeline, pass this VAE when loading the pipeline: | |
| ```python | |
| import torch | |
| from diffusers import AutoencoderKLFlux2 | |
| device = "cuda" | |
| dtype = torch.bfloat16 | |
| vae = AutoencoderKLFlux2.from_pretrained( | |
| "Rift-ai/Rift.1-decoder", | |
| torch_dtype=dtype, | |
| ).to(device) | |
| # Pass `vae=vae` into a compatible Diffusers image pipeline. | |
| ``` | |
| --- | |
| # **Artifact Files** | |
| | File | Purpose | | |
| |:---|:---| | |
| | `config.json` | Diffusers config with Rift metadata | | |
| | `diffusion_pytorch_model.safetensors` | Standard Diffusers weights | | |
| | `full_encoder_small_decoder.safetensors` | Full autoencoder-format weights | | |
| | `small_decoder.safetensors` | Decoder-only and post-quant-conv weights | | |
| | `comparison_panel.jpeg` | Full reference/Rift comparison | | |
| | `compare_full_decoder.png` | Reference decoder reconstruction sample | | |
| | `compare_small_decoder.png` | Rift decoder reconstruction sample | | |
| | `detail_zoom.jpeg` | Zoomed detail comparison | | |
| | `editing.jpg` | Additional visual sample | | |
| --- | |
| # **Limitations** | |
| - This repository contains a VAE decoder component, not a complete text-to-image model. | |
| - Visual quality depends on the surrounding diffusion model, scheduler, prompt, latent distribution, and inference settings. | |
| - The decoder may introduce color shifts, texture smoothing, edge artifacts, or small structural artifacts. | |
| - Text rendered in generated images may be inaccurate or distorted. | |
| - Prompt following is handled primarily by the surrounding generation pipeline, not the VAE decoder alone. | |
| - This model should be evaluated visually and quantitatively before production use. | |
| # **Out-of-Scope Use** | |
| This model and its derivatives may not be used outside the scope of the Rift Non-Commercial License v1.0, including for unlawful, fraudulent, defamatory, abusive, exploitative, privacy-invasive, or otherwise harmful purposes. | |
| --- | |
| # **Responsible AI Development** | |
| Rift.1-decoder should be evaluated as part of a complete image generation or image reconstruction system. A decoder can affect visual fidelity and artifacts, but safety behavior also depends on the text encoder, diffusion transformer, prompt filters, data pipeline, deployment environment, and downstream product policy. | |
| Users are responsible for applying appropriate safeguards, content review, watermarking or provenance notices where required, and compliance with applicable law. | |
| --- | |
| # **License** | |
| This model is licensed under the [Rift Non-Commercial License v1.0](./LICENSE.md). | |
| # **Trademarks & IP** | |
| This project may contain trademarks or references to third-party projects, products, or services. Use of Rift, Rift-ai, or associated marks in modified versions of this project must not imply sponsorship, endorsement, approval, or official status unless explicitly authorized. Third-party trademarks, intellectual property, and logos remain subject to their respective owners' policies. | |