Diffusers
ONNX
ORTStableDiffusionPipeline
How to use from the
Use from the
Diffusers library
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline

# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("sam749/ArtFusion-onnx-int8", dtype=torch.bfloat16, device_map="cuda")

prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]

ArtFusion-onnx-int8

192x320 portrait images grid 256x256 square images grid 320x192 landscape images grid

Model Details

A lightweight, efficient diffusion model engineered for fast, high-quality, low-resolution image generation. Built for constrained environments, the model weights are partially initialized from Stable Diffusion v1.4 and optimized for multi-aspect ratio flexibility.

⚠️ Experimental Status: This model is currently experimental, utilizing an aspect ratio bucketing strategy to train the UNet across multiple resolutions simultaneously. For a deep dive into the methodology, see the Training Section.

Supported Resolutions

The model natively supports the following resolution buckets:

Landscape: 320 × 192

Square: 256 × 256

Portrait: 192 × 320

Uses

# pip install "optimum-onnx[onnxruntime]"

from optimum.onnxruntime import ORTStableDiffusionPipeline

pipeline = ORTStableDiffusionPipeline.from_pretrained(
    "sam749/ArtFusion-onnx-int8",
    providers=["CPUExecutionProvider"]
)

prompt = "outdoors, mountain, sunset, no_humans, grass, scenery, sky, flower, mountainous_horizon, moon, cloud, reflection, evening, orb, landscape, plant, twilight"
result = pipeline(
        prompt,
        width=192,
        height=320,
        num_inference_steps=16,
    )

Most of the time you won't need negative_prompt

Training Details

Model was trained for 16 epochs with lr=1e-5

Limitations & Biases

Due to the composition of the training dataset, users should expect the following behavioral biases:

1. Aspect Ratio Bias: The training data was heavily skewed toward portrait-oriented images. As a result, the model performs optimally at 192x320 and may occasionally struggle with composition or coherence when generating in square or landscape resolutions.

2. Artistic Style Dominance: The dataset consists predominantly of artistic and illustrative styles. The model naturally mimics these aesthetics and is not intended for high-fidelity photorealism.

3. Prompting & Tag Bias: While the model understands standard natural language prompts, a significant portion of the training data utilized Danbooru-style tags. For the closest alignment to your prompt, incorporating descriptive tags (e.g., 1girl, solo, artistic style) alongside or instead of full sentences is highly recommended.

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

Dataset used to train sam749/ArtFusion-onnx-int8