--- library_name: diffusers base_model: - madebyollin/taesdxl --- # 🍰 Hybrid-sd-tinyvae-xl for Stable Diffusion (XL) [Hybrid-sd-tinyvae-xl](https://huggingface.co/cqyan/hybrid-sd-tinyvae-xl) is very tiny autoencoder which uses the same "latent API" as [SDXL-VAE](https://huggingface.co/stabilityai/sdxl-vae). Hybrid-sd-tinyvae-xl is a finetuned model based on the excellent work on [TAESDXL](https://github.com/madebyollin/taesdxl). In general, we mainly fix the low-saturation problem encountering in SDXL base model, by which we strengthening the saturation and contrast of images to deliver more clarity and colorfulness. The model is useful for real-time previewing of the SDXL generation process. It saves 13x decoder inference time (61.2ms,fp16,V100) compared to using the SDXL decoder (802.7ms,fp16,V100), and you are very welcome to try it !!!!!! T2I Comparison using one A100 GPU, The image order from left to right : [SDXL-VAE](https://huggingface.co/stabilityai/sdxl-vae) -> [TAESDXL](https://github.com/madebyollin/taesdxl) -> [Hybrid-sd-tinyvae-xl](https://huggingface.co/cqyan/hybrid-sd-tinyvae-xl) ![image/png](https://cdn-uploads.huggingface.co/production/uploads/664afcc45fdb7108205a15c3/Hkz8WEq0sFmn4jo3HsRkv.png) ![image/png](https://cdn-uploads.huggingface.co/production/uploads/664afcc45fdb7108205a15c3/0ql_vOAU_LPNJsKYonJKi.png) ![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/664afcc45fdb7108205a15c3/89uz2Rwg6f1VV896mDG3e.jpeg) ![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/664afcc45fdb7108205a15c3/JEsu03WFAyIDuUVftp1YG.jpeg) This repo contains `.safetensors` versions of the Hybrid-sd-tinyvae-xl weights. For SD1.x / SD2.x, use [Hybrid-sd-tinyvae](https://huggingface.co/cqyan/hybrid-sd-tinyvae) instead (the SD and SDXL VAEs are incompatible). ## Using in 🧨 diffusers ```python import torch from diffusers.models import AutoencoderTiny from diffusers import DiffusionPipeline pipe = DiffusionPipeline.from_pretrained( "stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16 ) vae = AutoencoderTiny.from_pretrained('cqyan/hybrid-sd-tinyvae-xl') pipe.vae = vae pipe = pipe.to("cuda") prompt = "A warm and loving family portrait, highly detailed, hyper-realistic, 8k resolution, photorealistic, soft and natural lighting" image = pipe(prompt, num_inference_steps=25).images[0] image.save("family.png") ```