diff --git a/README.md b/README.md index 3d1b10fe..93a47082 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,11 @@ We also provide a some command line based examples using state of the art models +- [Wuerstchen](./candle-examples/examples/wuerstchen/): another text to + image generative model. + + + - [yolo-v3](./candle-examples/examples/yolo-v3/) and [yolo-v8](./candle-examples/examples/yolo-v8/): object detection and pose estimation models. @@ -142,6 +147,7 @@ If you have an addition to this list, please submit a pull request. - Bert. - Whisper (multi-lingual support). - Stable Diffusion v1.5, v2.1, XL v1.0. + - Wurstchen v2. - Computer Vision Models. - DINOv2. - EfficientNet. diff --git a/candle-examples/examples/wuerstchen/README.md b/candle-examples/examples/wuerstchen/README.md new file mode 100644 index 00000000..1b8accd1 --- /dev/null +++ b/candle-examples/examples/wuerstchen/README.md @@ -0,0 +1,27 @@ +# candle-wuerstchen: Efficient Pretraining of Text-to-Image Models + +![anthropomorphic cat dressed as a fire fighter](./assets/cat.jpg) + +The `wuerstchen` example is a port of the [diffusers +implementation](https://github.com/huggingface/diffusers/tree/19edca82f1ff194c07317369a92b470dbae97f34/src/diffusers/pipelines/wuerstchen) for Würstchen v2. +The candle implementation reproduces the same structure/files for models and +pipelines. Useful resources: + +- [Official implementation](https://github.com/dome272/Wuerstchen). +- [Arxiv paper](https://arxiv.org/abs/2306.00637). +- Blog post: [Introducing Würstchen: Fast Diffusion for Image Generation](https://huggingface.co/blog/wuerstchen). + +## Getting the weights + +The weights are automatically downloaded for you from the [HuggingFace +Hub](https://huggingface.co/) on the first run. There are various command line +flags to use local files instead, run with `--help` to learn about them. + +## Running some example. + +```bash +cargo run --example wuerstchen --release --features cuda,cudnn -- \ + --prompt "Anthropomorphic cat dressed as a fire fighter" +``` + +The final image is named `sd_final.png` by default. diff --git a/candle-examples/examples/wuerstchen/assets/cat.jpg b/candle-examples/examples/wuerstchen/assets/cat.jpg new file mode 100644 index 00000000..9ff67183 Binary files /dev/null and b/candle-examples/examples/wuerstchen/assets/cat.jpg differ