From 7bd50cabafc60bf45ebbe1957b125d3f4c758ba8 Mon Sep 17 00:00:00 2001 From: apolinario Date: Tue, 6 Sep 2022 18:53:02 +0200 Subject: [PATCH] Add colab links to textual inversion (#375) --- examples/textual_inversion/README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/examples/textual_inversion/README.md b/examples/textual_inversion/README.md index 74ebcd5191..b731797ecb 100644 --- a/examples/textual_inversion/README.md +++ b/examples/textual_inversion/README.md @@ -3,6 +3,15 @@ [Textual inversion](https://arxiv.org/abs/2208.01618) is a method to personalize text2image models like stable diffusion on your own images using just 3-5 examples. The `textual_inversion.py` script shows how to implement the training procedure and adapt it for stable diffusion. +## Running on Colab + +Colab for training +[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/sd_textual_inversion_training.ipynb) + +Colab for inference +[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/stable_conceptualizer_inference.ipynb) + +## Running locally ### Installing the dependencies Before running the scipts, make sure to install the library's training dependencies: @@ -64,7 +73,6 @@ A full training run takes ~1 hour on one V100 GPU. Once you have trained a model using above command, the inference can be done simply using the `StableDiffusionPipeline`. Make sure to include the `placeholder_token` in your prompt. - ```python from torch import autocast