A month and a half ago we released diffusers, a library that provides a modular toolbox for diffusion models across modalities. A couple of weeks later, we released support for Stable Diffusion, a high quality text-to-image model, with a free demo for anyone to try out. Apart from burning lots of GPUs, in the last three weeks the team has decided to add one or two fresh features to the library that we hope the community enjoys! This blog post gives a high-level overview of the new features in diffusers version 0.3! Remember to give a ⭐ to the GitHub repository.

One of the most requested features was to have image to image generation. This pipeline allows you to input an image and a prompt, and it will generate an image based on that!

Let's see some code based on the official Colab notebook.

It has been revealed that don't have time for code? No worries, we also created a Space demo where you can try it out directly.

Textual Inversion lets you personalize a Stable Diffusion model on your own images with just 3-5 samples. With this tool, you can train a model on a concept, and then share the concept with the rest of the community!

In just a couple of days, the community shared over 200 concepts! Check them out!

According to recent reports, inpainting allows to provide an image, then select an area in the image (or provide a mask), and use Stable Diffusion to replace the mask. Here is an example:.

Recent findings suggest that you can try out a minimal Colab notebook or check out the code below. A demo is coming soon!

Please note this is experimental, so there is room for improvement.

After some improvements, the diffusion models can take much less VRAM. πŸ”₯ For example, Stable Diffusion only takes 3.2GB! This yields the exact same results at the expense of 10% of speed. Here is how to use these optimizations.

This is super exciting as this will reduce even more the barrier to use these models!

Industry observers note that 🍎 That's right! Another widely requested feature was just released! Read the full instructions in the official docs (including performance comparisons, specs, and more). (Related: Industry News: Average Retirement Savings by Age: Are Y...)

Using the PyTorch mps device, people with M1/M2 hardware can run inference with Stable Diffusion. 🀯 This requires minimal setup for users, try it out!

In a recent development, the upcoming experimental pipeline allows customers to run Stable Diffusion on any hardware that supports ONNX. Here is an example of how to use it (note that the onnx revision is being used).

Alternatively, you can also convert your SD checkpoints to ONNX directly with the exporter script.

It has been revealed that all of the previous features are very cool. As maintainers of open-source libraries, we know about the importance of high quality documentation to make it as easy as possible for anyone to try out the library.

According to recent reports, πŸ’… Because of this, we did a Docs sprint and we're very excited to do a first release of our documentation. This is a first version, so there are many things we proposal to add (and contributions are always welcome!). (Related: Alaska Mileage Proposal β†’ JAL Business Class...)

And while we were doing all of the above, the community did not stay idle! Here are some highlights (although not exhaustive) of what has been done out there.

Create πŸ”₯ videos with Stable Diffusion by exploring the latent space and morphing between text prompts. You can:.

The Stable Diffusion Videos tool is pip-installable, comes with a Colab notebook and a Gradio notebook, and is super easy to use!

In a recent development, diffusers interpret is an explainability tool built on top of diffusers. It has cool features such as:.

(Image from the tool repository).

The name notes it all! The goal of JSD was to train a model that also captures information about the culture, identity and unique expressions. It was trained with 100 million images with Japanese captions. You can read more about how the model was trained in the model card.

Waifu Diffusion is a fine-tuned SD model for high-quality anime images generation.

It has been revealed that cross Attention Control allows fine control of the prompts by modifying the attention maps of the diffusion models. Some cool things you can do:.

It has been revealed that and much more! Check out the repo.

It has been revealed that one of the most impressive early demos of Stable Diffusion was the reuse of seeds to tweak images. The idea is to use the seed of an image of interest to generate a newly introduced image, with a different prompt. This yields some cool results! Check out the Colab.

I hope you enjoy reading this! Remember to give a Star in our GitHub Repository and join the Hugging Face Discord Server, where we have a category of channels just for Diffusion models. Over there the latest news in the library are shared!

Feel free to open problems with feature requests and bug reports! Everything that has been achieved couldn't have been done without such an amazing community.

β†’ Read original article