vars.py 4.68 KB
Newer Older
Zhekai Zhang's avatar
Zhekai Zhang committed
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
113
114
115
116
117
118
119
120
MAX_IMAGE_SIZE = 2048
MAX_SEED = 1000000000

DEFAULT_HEIGHT = 1024
DEFAULT_WIDTH = 1024

PROMPT_TEMPLATES = {
    "None": "{prompt}",
    "Anime": "{prompt}, nm22 style",
    "GHIBSKY Illustration": "GHIBSKY style, {prompt}",
    "Realism": "{prompt}",
    "Yarn Art": "{prompt}, yarn art style",
    "Children Sketch": "sketched style, {prompt}",
}

LORA_PATHS = {
    "Anime": {
        "name_or_path": "alvdansen/sonny-anime-fixed",
        "weight_name": "araminta_k_sonnyanime_fluxd_fixed.safetensors",
    },
    "GHIBSKY Illustration": {
        "name_or_path": "aleksa-codes/flux-ghibsky-illustration",
        "weight_name": "lora.safetensors",
    },
    "Realism": {
        "name_or_path": "mit-han-lab/FLUX.1-dev-LoRA-Collections",
        "weight_name": "realism.safetensors",
    },
    "Yarn Art": {
        "name_or_path": "linoyts/yarn_art_Flux_LoRA",
        "weight_name": "pytorch_lora_weights.safetensors",
    },
    "Children Sketch": {
        "name_or_path": "mit-han-lab/FLUX.1-dev-LoRA-Collections",
        "weight_name": "sketch.safetensors",
    },
}

SVDQ_LORA_PATH_FORMAT = "mit-han-lab/svdquant-models/svdq-flux.1-dev-lora-{name}.safetensors"
SVDQ_LORA_PATHS = {
    "Anime": SVDQ_LORA_PATH_FORMAT.format(name="anime"),
    "GHIBSKY Illustration": SVDQ_LORA_PATH_FORMAT.format(name="ghibsky"),
    "Realism": SVDQ_LORA_PATH_FORMAT.format(name="realism"),
    "Yarn Art": SVDQ_LORA_PATH_FORMAT.format(name="yarn"),
    "Children Sketch": SVDQ_LORA_PATH_FORMAT.format(name="sketch"),
}


EXAMPLES = {
    "schnell": [
        [
            "An elegant, art deco-style cat with sleek, geometric fur patterns reclining next to a polished sign that "
            "reads 'MIT HAN Lab' in bold, stylized typography. The sign, framed in gold and silver, "
            "exudes a sophisticated, 1920s flair, with ambient light casting a warm glow around it.",
            4,
            1,
        ],
        [
            "Pirate ship trapped in a cosmic maelstrom nebula, rendered in cosmic beach whirlpool engine, "
            "volumetric lighting, spectacular, ambient lights, light pollution, cinematic atmosphere, "
            "art nouveau style, illustration art artwork by SenseiJaye, intricate detail.",
            4,
            2,
        ],
        [
            "A worker that looks like a mixture of cow and horse is working hard to type code.",
            4,
            3,
        ],
        [
            "A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage. "
            "She wears a black leather jacket, a long red dress, and black boots, and carries a black purse. "
            "She wears sunglasses and red lipstick. She walks confidently and casually. "
            "The street is damp and reflective, creating a mirror effect of the colorful lights. "
            "Many pedestrians walk about.",
            4,
            4,
        ],
        [
            "Cozy bedroom with vintage wooden furniture and a large circular window covered in lush green vines, "
            "opening to a misty forest. Soft, ambient lighting highlights the bed with crumpled blankets, a bookshelf, "
            "and a desk. The atmosphere is serene and natural. 8K resolution, highly detailed, photorealistic, "
            "cinematic lighting, ultra-HD.",
            4,
            5,
        ],
        [
            "A photo of a Eurasian lynx in a sunlit forest, with tufted ears and a spotted coat. The lynx should be "
            "sharply focused, gazing into the distance, while the background is softly blurred for depth. Use cinematic "
            "lighting with soft rays filtering through the trees, and capture the scene with a shallow depth of field "
            "for a natural, peaceful atmosphere. 8K resolution, highly detailed, photorealistic, "
            "cinematic lighting, ultra-HD.",
            4,
            6,
        ],
    ],
    "dev": [
        [
            'a cyberpunk cat holding a huge neon sign that says "SVDQuant is lite and fast", wearing fancy goggles and '
            "a black leather jacket.",
            25,
            3.5,
            "None",
            0,
            2,
        ],
        ["a dog wearing a wizard hat", 28, 3.5, "Anime", 1, 23],
        [
            "a fisherman casting a line into a peaceful village lake surrounded by quaint cottages",
            28,
            3.5,
            "GHIBSKY Illustration",
            1,
            233,
        ],
        ["a man in armor with a beard and a sword", 25, 3.5, "Realism", 0.9, 2333],
        ["a panda playing in the snow", 28, 3.5, "Yarn Art", 1, 23333],
        ["A squirrel wearing glasses and reading a tiny book under an oak tree", 24, 3.5, "Children Sketch", 1, 233333],
    ],
}