File size: 2,247 Bytes
37112ef
42ae52a
 
37112ef
 
 
42ae52a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37112ef
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import os
import json

import torch


css = """
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');
body {
    font-family: 'Poppins', sans-serif !important;
}
.center-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}
.center-content h1 {
    font-weight: 600;
    margin-bottom: 1rem;
}
.center-content p {
    margin-bottom: 1.5rem;
}
"""


class Config:
    # General
    SECRET_KEY = os.environ.get('SECRET_KEY', '12345678')
    
    # Images
    # IMAGE_MODELS = ["black-forest-labs/FLUX.1-dev", "stabilityai/stable-diffusion-xl-base-1.0"]
    IMAGES_MODELS = [{"repo_id": "black-forest-labs/FLUX.1-dev", "loader": "flux", "compute_type": torch.bfloat16,}, {"repo_id": "stabilityai/stable-diffusion-xl-base-1.0", "loader": "sdxl", "compute_type": torch.float16,}]
    with open('data/loras/sdxl.json') as f:
        IMAGES_LORAS_SDXL = json.load(f)
    with open('data/loras/flux.json') as f:
        IMAGES_LORAS_FLUX = json.load(f)
    IMAGES_CONTROLNETS = [
        {
            "repo_id": "xinsir/controlnet-depth-sdxl-1.0",
            "name": "depth_xl",
            "layers": ["depth"],
            "loader": "sdxl",
            "compute_type": torch.float16,
        },
        {
            "repo_id": "xinsir/controlnet-canny-sdxl-1.0",
            "name": "canny_xl",
            "layers": ["canny"],
            "loader": "sdxl",
            "compute_type": torch.float16,
        },
        {
            "repo_id": "xinsir/controlnet-openpose-sdxl-1.0",
            "name": "openpose_xl",
            "layers": ["pose"],
            "loader": "sdxl",
            "compute_type": torch.float16,
        },
        {
            "repo_id": "xinsir/controlnet-scribble-sdxl-1.0",
            "name": "scribble_xl",
            "layers": ["scribble"],
            "loader": "sdxl",
            "compute_type": torch.float16,
        },
        {
            "repo_id": "Shakker-Labs/FLUX.1-dev-ControlNet-Union-Pro",
            "name": "flux1_union_pro",
            "layers": ["canny", "tile", "depth", "blur", "pose", "gray", "low_quality"],
            "loader": "flux-multi",
            "compute_type": torch.bfloat16,
        }
    ]