mickeyvanolst/sdxl-vae-fp16-fix-coreml

🤗 Hugging Face sourcemit68 MBother✓ 3 checksumsupdated today
Submit in one command

Run it next to your model folder. It makes the torrent, checks your files against Hugging Face, and submits it. You just start seeding and paste your key from your account. It only reads your files and never changes them. Read the script first if you like.

curl -fsSL https://pirateface.co/package.sh | bash -s -- --repo mickeyvanolst/sdxl-vae-fp16-fix-coreml ./model-folder
Needs a seeder →

SDXL VAE encoder — fp16 fix, compiled for Core ML

VAEEncoderSDXLFix.mlmodelc — an fp16-safe VAE encoder for Stable Diffusion XL, compiled for Core ML (Apple Silicon).

Why this exists

Apple's coreml-stable-diffusion-xl-base ships a VAE encoder that produces NaN for any input (apple/ml-stable-diffusion#297). The decoder is fine, so text-to-image works — but image-to-image is impossible, because encoding the source image is the first step.

Swapping this encoder into the pipeline folder fixes that.

Use

Replace VAEEncoder.mlmodelc inside a compiled SDXL pipeline folder:

rm -rf <pipeline>/VAEEncoder.mlmodelc
cp -R VAEEncoderSDXLFix.mlmodelc <pipeline>/VAEEncoder.mlmodelc

Provenance and license

Converted from madebyollin/sdxl-vae-fp16-fix (MIT) — an SDXL VAE retuned to run in fp16 without overflowing. This repository redistributes it as a Core ML format conversion, under the same MIT license. All credit for the fix itself goes to madebyollin.

Converted for AML — Apple ML operators for TouchDesigner, which fetches it on demand for SDXL image-to-image.