Notebooks
H
Hugging Face
Stable Conceptualizer Inference

Stable Conceptualizer Inference

hf-notebooksdiffusers

Open In Colab

Stable Conceptualizer - Stable Diffusion using learned concepts

The Stable Conceptualizer enables you to use pre-learned concepts on Stable Diffusion via textual-inversion using ๐Ÿค— Hugging Face ๐Ÿงจ Diffusers library.

Textual Inversion example

Navigate the library of pre-learned concepts here. For teaching the model new concepts using Textual Inversion, use this notebook.

Initial setup

[1]
     โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 934.9/934.9 kB 13.5 MB/s eta 0:00:00
     โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 7.0/7.0 MB 52.7 MB/s eta 0:00:00
     โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 53.1/53.1 kB 5.3 MB/s eta 0:00:00
     โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 219.1/219.1 kB 15.2 MB/s eta 0:00:00
     โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 224.5/224.5 kB 3.2 MB/s eta 0:00:00
     โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 7.8/7.8 MB 55.5 MB/s eta 0:00:00
[2]
VBox(children=(HTML(value='<center> <img\nsrc=https://huggingface.co/front/assets/huggingface_logo-noborder.svโ€ฆ
[3]

Run Stable Diffusion with pre-trained Learned Concepts

If you want to teach Stable Diffusion your own concepts, use this notebook.

[4]
pretrained_model_name_or_path
[5]
repo_id_embeds
Downloading learned_embeds.bin:   0%|          | 0.00/3.82k [00:00<?, ?B/s]
Downloading (โ€ฆ)token_identifier.txt:   0%|          | 0.00/9.00 [00:00<?, ?B/s]

The placeholder token for your concept is <cat-toy>

[11]
`text_config_dict` is provided which will be used to initialize `CLIPTextConfig`. The value `text_config["id2label"]` will be overriden.
[12]
[9]
prompt
num_samples
num_rows
  0%|          | 0/50 [00:00<?, ?it/s]
  0%|          | 0/50 [00:00<?, ?it/s]
Output