CoolFace
Apppublic

ml6team/controlnet-interior-design

sourceHugging Faceopenrailupdated 2y agoView on Hugging Face
252likes
config.py36 linesDownload Raw Back to root
1"""File with configs"""2from palette import COLOR_MAPPING_, COLOR_MAPPING3 4HEIGHT = 5125WIDTH = 5126 7def to_rgb(color: str) -> tuple:8    """Convert hex color to rgb.9    Args:10        color (str): hex color11    Returns:12        tuple: rgb color13    """14    return tuple(int(color[i:i+2], 16) for i in (1, 3, 5))15 16COLOR_NAMES = list(COLOR_MAPPING.keys())17COLOR_RGB = [to_rgb(k) for k in COLOR_MAPPING_.keys()] + [(0, 0, 0), (255, 255, 255)]18INVERSE_COLORS = {v: to_rgb(k) for k, v in COLOR_MAPPING_.items()}19COLOR_MAPPING_RGB = {to_rgb(k): v for k, v in COLOR_MAPPING_.items()}20 21def map_colors(color: str) -> str:22    """Map color to hex value.23    Args:24        color (str): color name25    Returns:26        str: hex value27    """28    return COLOR_MAPPING[color]29 30def map_colors_rgb(color: tuple) -> str:31    return COLOR_MAPPING_RGB[color]32 33 34POS_PROMPT = "tree, sky, cloud, scenery, outdoors, grass, flowers, sunlight, beautiful, ultra detailed beautiful landscape, architectural renderings vegetation, high res, best high quality landscape, outdoor lighting, sunshine, 4k, 8k, realistic"35NEG_PROMPT= "lowres, deformed, blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, extra limb, ugly, poorly drawn hands, missing limb, blurry, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long neck, long body, mutated hands and fingers, out of frame"36