mickeyvanolst/sdxl-vae-fp16-fix-coreml

🤗 Hugging Face 来源mit68 MBother✓ 3 个校验和今天更新
一条命令提交

在你的模型文件夹旁边运行它。它会制作种子、将文件与 Hugging Face 比对,然后提交。你只需开始做种,并粘贴你账户中的密钥。它只读取你的文件,绝不修改。如果愿意,可以先阅读脚本。

curl -fsSL https://pirateface.co/package.sh | bash -s -- --repo mickeyvanolst/sdxl-vae-fp16-fix-coreml ./model-folder
需要做种者 →

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.