How to use from the
Use from the
Diffusers library
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("greentree/SDXL-Refiner-olive-optimized", 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]

Model Stable Diffusion XL 1.0 Refiner optimized using Microsoft Olive (https://github.com/microsoft/Olive). Provides massively increased generation speed on my AMD RX 7900 XT for images of size 1024*1024. (~10s/it --> ~3.80it/s)

Warning: Requires ONNX Runtime, so this will not work interchangably with any other custom model.

Credit for the original model to StabilityAI: https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0

Other models I've uploaded: https://huggingface.co/greentree/SDXL-olive-optimized, https://huggingface.co/greentree/Dreamshaper-XL-olive-optimized

Downloads last month
5
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support