File size: 4,874 Bytes
0d65fdc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# _AVAILABLE_MODELS = [
#     "stabilityai/stable-diffusion-2-1-base",
#     "Lykon/dreamshaper-8",
#     "Lykon/absolute-reality-1.81",
#     # "stabilityai/sdxl-turbo",
#     # "Lykon/dreamshaper-xl-turbo",
#     # "stabilityai/stable-diffusion-xl-base-1.0",
# ]

# _DEFAULT_MODEL = _AVAILABLE_MODELS[0]

# def generate_model_dict():
#     return {
#         "unet_config": "unet/config.json",
#         "unet": "unet/diffusion_pytorch_model.safetensors",
#         "text_encoder_config": "text_encoder/config.json",
#         "text_encoder": "text_encoder/model.safetensors",
#         "vae_config": "vae/config.json",
#         "vae": "vae/diffusion_pytorch_model.safetensors",
#         "diffusion_config": "scheduler/scheduler_config.json",
#         "tokenizer_vocab": "tokenizer/vocab.json",
#         "tokenizer_merges": "tokenizer/merges.txt",
#     }

# _MODELS = {model: generate_model_dict() for model in _AVAILABLE_MODELS}


MODELS = {
    # See https://huggingface.co/stabilityai/sdxl-turbo for the model details and license
    "stabilityai/sdxl-turbo": {
        "unet_config": "unet/config.json",
        "unet": "unet/diffusion_pytorch_model.safetensors",
        "text_encoder_config": "text_encoder/config.json",
        "text_encoder": "text_encoder/model.safetensors",
        "text_encoder_2_config": "text_encoder_2/config.json",
        "text_encoder_2": "text_encoder_2/model.safetensors",
        "vae_config": "vae/config.json",
        "vae": "vae/diffusion_pytorch_model.safetensors",
        "diffusion_config": "scheduler/scheduler_config.json",
        "tokenizer_vocab": "tokenizer/vocab.json",
        "tokenizer_merges": "tokenizer/merges.txt",
        "tokenizer_2_vocab": "tokenizer_2/vocab.json",
        "tokenizer_2_merges": "tokenizer_2/merges.txt",
    },
    "stabilityai/stable-diffusion-xl-base-1.0":{
        "unet_config": "unet/config.json",
        "unet": "unet/diffusion_pytorch_model.safetensors",
        "text_encoder_config": "text_encoder/config.json",
        "text_encoder": "text_encoder/model.safetensors",
        "text_encoder_2_config": "text_encoder_2/config.json",
        "text_encoder_2": "text_encoder_2/model.safetensors",
        "vae_config": "vae/config.json",
        "vae": "vae/diffusion_pytorch_model.safetensors",
        "diffusion_config": "scheduler/scheduler_config.json",
        "tokenizer_vocab": "tokenizer/vocab.json",
        "tokenizer_merges": "tokenizer/merges.txt",
        "tokenizer_2_vocab": "tokenizer_2/vocab.json",
        "tokenizer_2_merges": "tokenizer_2/merges.txt",

    },
    # See https://huggingface.co/stabilityai/stable-diffusion-2-1-base for the model details and license
    "stabilityai/stable-diffusion-2-1-base": {
        "unet_config": "unet/config.json",
        "unet": "unet/diffusion_pytorch_model.safetensors",
        "text_encoder_config": "text_encoder/config.json",
        "text_encoder": "text_encoder/model.safetensors",
        "vae_config": "vae/config.json",
        "vae": "vae/diffusion_pytorch_model.safetensors",
        "diffusion_config": "scheduler/scheduler_config.json",
        "tokenizer_vocab": "tokenizer/vocab.json",
        "tokenizer_merges": "tokenizer/merges.txt",
    },
    "runwayml/stable-diffusion-v1-5": {
        "unet_config": "unet/config.json",
        "unet": "unet/diffusion_pytorch_model.safetensors",
        "text_encoder_config": "text_encoder/config.json",
        "text_encoder": "text_encoder/model.safetensors",
        "vae_config": "vae/config.json",
        "vae": "vae/diffusion_pytorch_model.safetensors",
        "diffusion_config": "scheduler/scheduler_config.json",
        "tokenizer_vocab": "tokenizer/vocab.json",
        "tokenizer_merges": "tokenizer/merges.txt",
    },
    # "Lykon/dreamshaper-8": {
    #     "unet_config": "unet/config.json",
    #     "unet": "unet/diffusion_pytorch_model.safetensors",
    #     "text_encoder_config": "text_encoder/config.json",
    #     "text_encoder": "text_encoder/model.safetensors",
    #     "vae_config": "vae/config.json",
    #     "vae": "vae/diffusion_pytorch_model.safetensors",
    #     "diffusion_config": "scheduler/scheduler_config.json",
    #     "tokenizer_vocab": "tokenizer/vocab.json",
    #     "tokenizer_merges": "tokenizer/merges.txt",
    # },
    "SG161222/Realistic_Vision_V3.0_VAE": {
        "unet_config": "unet/config.json",
        "unet": "unet/diffusion_pytorch_model.safetensors",
        "text_encoder_config": "text_encoder/config.json",
        "text_encoder": "text_encoder/model.safetensors",
        "vae_config": "vae/config.json",
        "vae": "vae/diffusion_pytorch_model.safetensors",
        "diffusion_config": "scheduler/scheduler_config.json",
        "tokenizer_vocab": "tokenizer/vocab.json",
        "tokenizer_merges": "tokenizer/merges.txt",
    }
}
_AVAILABLE_MODELS = list(MODELS.keys())