How to Save an SDXL Model into a Single File safetensors file
A member of my team has trained a custom SDXL model. To use this custom model we must create a single file that can replacethis file in the official SDXL 1.0 Hugging Face repository.However, I can not find documentation on how to create a single file like this one in the official SDXL repository that includes the UNet, CLIP, and VAE weights saved into a single safetensors format file.How can I create a file that can serve as a drop-in replacement forsd_xl_base_1.0.safetensors?This code example does not produce any single file containing the UNet, CLIP, and VAE weights:pipe = StableDiffusionXLPipeline.from_pretrained(
    "Our-Custom-Model",
)

pipe.save_pretrained(
    save_directory="tmp",
    push_to_hub=True,
    repo_id="Our-Custom-Model",
)
2024-01-03T21:42:47Z
For additional context, these Hugging Face loaders exist to load single file models but I can not find corresponding methods to write/save hugging face diffuser models in this format:Single files
2024-03-15T05:46:05Z
hi! I’m currently pondering this question as well. Have you found a solution?
2024-05-05T20:12:16Z
ComfyUI has node CheckpointSave (Add Node > advanced > model_merging).Find a simple workflow (they usually have node to load checkpoint, you can delete it).Add nodes to load each of models’ components (Add Node > loaders, or Add Node > advanced > loaders)Connect them to the node CheckpointSave.Queue a simple prompt (you can set steps to 1 in KSampler).That’s the only workaround I have found