CoolFace
Apppublic

hololens/stable-diffusion-webui-depthmap-script

sourceHugging Faceupdated 2y agoView on Hugging Face
1likes
common_constants.py67 linesDownload Raw Back to src
1import enum
2
3
4class GenerationOptions(enum.Enum):
5    """This Enum provides the options that are used in the usual generation
6    (that is, consumed by the core_generation_funnel).
7    Please use this to avoid typos. Also, this enum provides default values for these options."""
8    def __new__(cls, *args, **kwds):
9        value = len(cls.__members__) + 1
10        obj = object.__new__(cls)
11        obj._value_ = value
12        return obj
13
14    def __init__(self, default_value=None, *args):
15        """Saves default value as a member (called "df") of a member of this enum"""
16        self.df = default_value
17
18    COMPUTE_DEVICE = "GPU"
19    MODEL_TYPE = "Depth Anything v2 Base"  # Will become enum element
20    BOOST = False
21    NET_SIZE_MATCH = False
22    NET_WIDTH = 448
23    NET_HEIGHT = 448
24    TILING_MODE = False
25
26    DO_OUTPUT_DEPTH = True
27    OUTPUT_DEPTH_INVERT = False
28    OUTPUT_DEPTH_COMBINE = False
29    OUTPUT_DEPTH_COMBINE_AXIS = "Horizontal"  # Format (str) is subject to change
30    DO_OUTPUT_DEPTH_PREDICTION = False  # Hidden, do not use, subject to change
31
32    CLIPDEPTH = False
33    CLIPDEPTH_MODE = "Range"
34    CLIPDEPTH_FAR = 0.0
35    CLIPDEPTH_NEAR = 1.0
36
37    GEN_STEREO = False
38    STEREO_MODES = ["left-right", "red-cyan-anaglyph"]
39    STEREO_DIVERGENCE = 2.5
40    STEREO_SEPARATION = 0.0
41    STEREO_FILL_ALGO = "polylines_sharp"
42    STEREO_OFFSET_EXPONENT = 1.0
43    STEREO_BALANCE = 0.0
44
45    GEN_NORMALMAP = False
46    NORMALMAP_PRE_BLUR = False
47    NORMALMAP_PRE_BLUR_KERNEL = 3
48    NORMALMAP_SOBEL = True
49    NORMALMAP_SOBEL_KERNEL = 3
50    NORMALMAP_POST_BLUR = False
51    NORMALMAP_POST_BLUR_KERNEL = 3
52    NORMALMAP_INVERT = False
53
54    GEN_HEATMAP = False
55
56    GEN_SIMPLE_MESH = False
57    SIMPLE_MESH_OCCLUDE = True
58    SIMPLE_MESH_SPHERICAL = False
59
60    GEN_INPAINTED_MESH = False
61    GEN_INPAINTED_MESH_DEMOS = False
62
63    GEN_REMBG = False
64    SAVE_BACKGROUND_REMOVAL_MASKS = False  # Legacy, will be reworked
65    PRE_DEPTH_BACKGROUND_REMOVAL = False  # Legacy, will be reworked
66    REMBG_MODEL = "u2net"
67