YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

SDXL modular ONNX export

This folder follows the repository ONNX convention: each exported file maps to one clear runtime module, with a manifest and a verification script.

Modules

  • onnx/text_encoder.onnx: CLIP-L token ids to SDXL hidden states.
  • onnx/text_encoder_2.onnx: bigG token ids to hidden states and pooled text embeddings.
  • onnx/unet.onnx: one denoising noise prediction step with SDXL added conditioning.
  • onnx/vae_encoder.onnx: image tensor to latent tensor.
  • onnx/vae_decoder.onnx: latent tensor to image tensor.
  • onnx/model-manifest.json: exported module metadata.

SDXL UNet is larger than the practical ONNX protobuf single-file limit, so it is published as unet.onnx plus one companion unet.onnx.data file. It is not published as hundreds of initializer shard files.

Tokenizer files and scheduler config are saved beside this folder:

sdxl\tokenizer\
sdxl\tokenizer_2\
sdxl\scheduler_config.json

Export

python .\sdxl\export_sdxl_onnx.py --device cuda --dtype fp16 --module all

Export a single module while iterating:

python .\sdxl\export_sdxl_onnx.py --device cuda --dtype fp16 --module text_encoder

Write only the manifest skeleton:

python .\sdxl\export_sdxl_onnx.py --dry-run

Verify

Shape smoke test with ONNX Runtime:

python .\sdxl\verify_sdxl_onnx.py --module all --provider DmlExecutionProvider

If the full UNet smoke test is too heavy for the current machine, verify file presence first:

python .\sdxl\verify_sdxl_onnx.py --manifest-only

Run

python .\sdxl\run_sdxl_onnx.py --provider DmlExecutionProvider --steps 2 --height 512 --width 512

The runner uses the two SDXL text encoders, performs classifier-free guidance, feeds text_embeds and time_ids into the UNet, then decodes latents through the ONNX VAE decoder.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support