Skip to content

[diffusers]: import CompVis-flavored ckpt models #1690

@keturn

Description

@keturn

As I watch the new users roll in with their suitcases full of ckpt files, I'm realizing that a thing I hoped I could hand-wave away will need to be addressed for the diffusers release: handling ckpt model weights saved from some CompVis-derived code.

The ideal UX would be to just load them seamlessly, transparently rewriting the references from the CompVis structure to the 🧨diffusers structure on the fly. I think that may be technically possible, but y'all aren't paying me enough to put that much work in to a legacy format with only a couple months of legacy behind it.

The other option would be to have an import command that converts them. It means duplicating the storage space if they are attached to keeping their old copies, but it's a one-time operation that doesn't add any burden to the rest of the process. Should be able to convert them over to safetensors while we're at it.

I'm not sure how resource-intensive the conversion process is. Saving to safetensors shouldn't be too bad? But if, for some reason, that turns out to have explosive RAM requirements, the other other option would be to search a model hub on huggingface or someplace and see if there's a host already serving a diffusers-flavored version of that model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions