File size: 3,543 Bytes
65d64be
23f4f95
 
9edebae
 
 
 
 
 
 
 
 
 
 
23f4f95
65d64be
f70898c
 
65d64be
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f70898c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23f4f95
 
 
 
 
 
 
 
9edebae
 
 
 
23f4f95
 
af07f4b
9edebae
23f4f95
 
 
 
9edebae
 
23f4f95
9edebae
 
af07f4b
9edebae
 
 
 
 
 
 
75805bd
9edebae
 
 
 
 
 
 
 
23f4f95
9edebae
f8b0f0f
23f4f95
 
9edebae
39a6792
f70898c
 
23f4f95
 
75805bd
61ad3d2
9edebae
232c234
23f4f95
 
 
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
109
110
111
112
import os
from types import SimpleNamespace

from diffusers import (
    DDIMScheduler,
    DEISMultistepScheduler,
    DPMSolverMultistepScheduler,
    EulerAncestralDiscreteScheduler,
    EulerDiscreteScheduler,
    PNDMScheduler,
    StableDiffusionImg2ImgPipeline,
    StableDiffusionPipeline,
)

Config = SimpleNamespace(
    HF_TOKEN=os.environ.get("HF_TOKEN", None),
    CIVIT_TOKEN=os.environ.get("CIVIT_TOKEN", None),
    HF_MODELS={
        "Lykon/dreamshaper-8": [
            "feature_extractor/preprocessor_config.json",
            "safety_checker/config.json",
            "scheduler/scheduler_config.json",
            "text_encoder/config.json",
            "text_encoder/model.fp16.safetensors",
            "tokenizer/merges.txt",
            "tokenizer/special_tokens_map.json",
            "tokenizer/tokenizer_config.json",
            "tokenizer/vocab.json",
            "unet/config.json",
            "unet/diffusion_pytorch_model.fp16.safetensors",
            "vae/config.json",
            "vae/diffusion_pytorch_model.fp16.safetensors",
            "model_index.json",
        ],
    },
    CIVIT_LORAS={
        # https://civitai.com/models/411088?modelVersionId=486099
        "perfection_style": {
            "model_id": "411088",
            "model_version_id": "486099",
            "name": "Perfection Style",
            "trigger": "perfection style",
        },
        # https://civitai.com/models/421162?modelVersionId=486110
        "detailed_style": {
            "model_id": "421162",
            "model_version_id": "486110",
            "name": "Detailed Style",
            "trigger": "detailed style",
        },
    },
    MONO_FONTS=["monospace"],
    SANS_FONTS=[
        "sans-serif",
        "Apple Color Emoji",
        "Segoe UI Emoji",
        "Segoe UI Symbol",
        "Noto Color Emoji",
    ],
    PIPELINES={
        "txt2img": StableDiffusionPipeline,
        "img2img": StableDiffusionImg2ImgPipeline,
    },
    MODEL="Lykon/dreamshaper-8",
    MODELS=[
        "Comfy-Org/stable-diffusion-v1-5-archive",
        "cyberdelia/CyberRealistic",
        "fluently/Fluently-v4",
        "Linaqruf/anything-v3-1",
        "Lykon/dreamshaper-8",
        "prompthero/openjourney-v4",
        "SG161222/Realistic_Vision_V5.1_noVAE",
        "XpucT/Deliberate",
    ],
    MODEL_CHECKPOINTS={
        # keep keys lowercase
        "comfy-org/stable-diffusion-v1-5-archive": "v1-5-pruned-emaonly-fp16.safetensors",
        "cyberdelia/cyberrealistic": "CyberRealistic_V5_FP16.safetensors",
        "fluently/fluently-v4": "Fluently-v4.safetensors",
        "linaqruf/anything-v3-1": "anything-v3-2.safetensors",
        "prompthero/openjourney-v4": "openjourney-v4.ckpt",
        "sg161222/realistic_vision_v5.1_novae": "Realistic_Vision_V5.1_fp16-no-ema.safetensors",
        "xpuct/deliberate": "Deliberate_v6.safetensors",
    },
    SCHEDULER="Euler",
    SCHEDULERS={
        "DDIM": DDIMScheduler,
        "DEIS 2M": DEISMultistepScheduler,
        "DPM++ 2M": DPMSolverMultistepScheduler,
        "Euler": EulerDiscreteScheduler,
        "Euler a": EulerAncestralDiscreteScheduler,
        "PNDM": PNDMScheduler,
    },
    EMBEDDING="fast_negative",
    EMBEDDINGS=[
        "cyberrealistic_negative",
        "fast_negative",
        "unrealistic_dream",
    ],
    STYLE="enhance",
    WIDTH=512,
    HEIGHT=512,
    NUM_IMAGES=1,
    SEED=-1,
    GUIDANCE_SCALE=5,
    INFERENCE_STEPS=35,
    DENOISING_STRENGTH=0.7,
    DEEPCACHE_INTERVAL=1,
    SCALE=1,
    SCALES=[1, 2, 4],
)