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, } ]