diffusers
diffusers copied to clipboard
How to convert Flax model to .ckpt ?
I would like to know how to convert a ckpt for use with JAX and TPU in the flaxpipeline.
Hey @G-force78,
You need to first convert the .ckpt to a PyTorch diffusers checkpointhttps://github.com/huggingface/diffusers/blob/main/scripts/convert_original_stable_diffusion_to_diffusers.py: and then you can load it with:
flax_pipe, params = FlaxStableDiffusionPipeline.from_pretrained("/path/to/diffusers/folder", from_pt=True)
To go from PyTorch => Flax I think there is an open PR here: https://github.com/huggingface/diffusers/pull/1241
We need some functionality for this. I think I can help with the PR next week
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
Is there any update with this?
We currently sadly don't have the time to look into it. Would be great if someone from the community could try to take the lead here.
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.