Instructions to use madebyollin/taesd-x4-upscaler with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use madebyollin/taesd-x4-upscaler with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("madebyollin/taesd-x4-upscaler", 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
π° Tiny AutoEncoder for Stable Diffusion X4 Upscaler
taesd-x4-upscaler is very tiny autoencoder which uses the same "latent API" as stable-diffusion-x4-upscaler's VAE.
taesd-x4-upscaler is useful for real-time previewing of the upsampling process.
This repo contains .safetensors versions of the taesd-x4-upscaler weights.
Using in 𧨠diffusers
import requests
from PIL import Image
from io import BytesIO
url = "https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/sd2-upscale/low_res_cat.png"
low_res_img = Image.open(BytesIO(requests.get(url).content)).convert("RGB").resize((128, 128))
import torch
from diffusers import StableDiffusionUpscalePipeline, AutoencoderTiny
pipe = StableDiffusionUpscalePipeline.from_pretrained("stabilityai/stable-diffusion-x4-upscaler", torch_dtype=torch.float16)
pipe.vae = AutoencoderTiny.from_pretrained("madebyollin/taesd-x4-upscaler", torch_dtype=torch.float16)
pipe = pipe.to("cuda")
image = pipe("a white cat", image=low_res_img, num_inference_steps=25).images[0]
image.save("upsampled.png")
- Downloads last month
- 57
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support