-
Notifications
You must be signed in to change notification settings - Fork 45
/
__init__.py
45 lines (39 loc) · 1.84 KB
/
__init__.py
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
import folder_paths
import os
def _add_folder_path(folder_name: str, extensions_to_register: list):
path = os.path.join(folder_paths.models_dir, folder_name)
folders, extensions = folder_paths.folder_names_and_paths.get(folder_name, ([], set()))
if path not in folders:
folders.append(path)
if isinstance(extensions, set):
extensions.update(extensions_to_register)
elif isinstance(extensions, list):
extensions.extend(extensions_to_register)
else:
e = f"Failed to register models/inpaint folder. Found existing value: {extensions}"
raise Exception(e)
folder_paths.folder_names_and_paths[folder_name] = (folders, extensions)
_add_folder_path("inpaint", [".pt", ".pth", ".safetensors", ".patch"])
from . import nodes
NODE_CLASS_MAPPINGS = {
"INPAINT_LoadFooocusInpaint": nodes.LoadFooocusInpaint,
"INPAINT_ApplyFooocusInpaint": nodes.ApplyFooocusInpaint,
"INPAINT_VAEEncodeInpaintConditioning": nodes.VAEEncodeInpaintConditioning,
"INPAINT_MaskedFill": nodes.MaskedFill,
"INPAINT_MaskedBlur": nodes.MaskedBlur,
"INPAINT_LoadInpaintModel": nodes.LoadInpaintModel,
"INPAINT_InpaintWithModel": nodes.InpaintWithModel,
"INPAINT_ExpandMask": nodes.ExpandMask,
"INPAINT_DenoiseToCompositingMask": nodes.DenoiseToCompositingMask,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"INPAINT_LoadFooocusInpaint": "Load Fooocus Inpaint",
"INPAINT_ApplyFooocusInpaint": "Apply Fooocus Inpaint",
"INPAINT_VAEEncodeInpaintConditioning": "VAE Encode & Inpaint Conditioning",
"INPAINT_MaskedFill": "Fill Masked Area",
"INPAINT_MaskedBlur": "Blur Masked Area",
"INPAINT_LoadInpaintModel": "Load Inpaint Model",
"INPAINT_InpaintWithModel": "Inpaint (using Model)",
"INPAINT_ExpandMask": "Expand Mask",
"INPAINT_DenoiseToCompositingMask": "Denoise to Compositing Mask",
}