Image-to-Image
Diffusers
ONNX
English
ORTStableDiffusionXLImg2ImgPipeline
art
stable-diffusion-xl
onnxruntime-directml
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