-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path__init__.py
128 lines (103 loc) · 4.18 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
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
import os
base_sage_path = os.path.dirname(os.path.realpath(__file__))
print(f"Base Sage Path: {base_sage_path}")
from .sage import *
cache.cache.load()
sage_styles.load_styles()
WEB_DIRECTORY = "./js"
# A dictionary that contains all nodes you want to export with their names
# NOTE: names should be globally unique
NODE_CLASS_MAPPINGS = {
# Primitive nodes
"Sage_SetBool": Sage_SetBool,
"Sage_SetInteger": Sage_SetInteger,
"Sage_SetFloat": Sage_SetFloat,
# Logic nodes
"Sage_LogicalSwitch": Sage_LogicalSwitch,
# Text nodes
"Sage_SetText": Sage_SetText,
"Sage_JoinText": Sage_JoinText,
"Sage_TripleJoinText": Sage_TripleJoinText,
"Sage_CleanText": Sage_CleanText,
"Sage_ViewText": Sage_ViewText,
"Sage_PonyPrefix": Sage_PonyPrefix,
# Model nodes
"Sage_UNETLoader": Sage_UNETLoader,
"Sage_CheckpointLoaderSimple": Sage_CheckpointLoaderSimple,
"Sage_CheckpointLoaderRecent": Sage_CheckpointLoaderRecent,
"Sage_ModelInfo": Sage_ModelInfo,
"Sage_CacheMaintenance": Sage_CacheMaintenance,
"Sage_ModelReport": Sage_ModelReport,
# Lora stack nodes
"Sage_LoraStack": Sage_LoraStack,
"Sage_LoraStackRecent": Sage_LoraStackRecent,
"Sage_LoraStackLoader": Sage_LoraStackLoader,
"Sage_CollectKeywordsFromLoraStack": Sage_CollectKeywordsFromLoraStack,
"Sage_LastLoraInfo": Sage_LastLoraInfo,
# Clip nodes
"Sage_DualCLIPTextEncode": Sage_DualCLIPTextEncode,
"Sage_ConditioningZeroOut": Sage_ConditioningZeroOut,
#"Sage_ConditioningOneOut": Sage_ConditioningZeroOut,
"Sage_ConditioningRngOut": Sage_ConditioningRngOut,
# Sampler nodes
"Sage_KSampler": Sage_KSampler,
# Image nodes
"Sage_LoadImage": Sage_LoadImage,
"Sage_EmptyLatentImagePassthrough": Sage_EmptyLatentImagePassthrough,
"Sage_SaveImageWithMetadata": Sage_SaveImageWithMetadata,
# Metadata nodes
"Sage_SamplerInfo": Sage_SamplerInfo,
"Sage_AdvSamplerInfo": Sage_AdvSamplerInfo,
"Sage_ConstructMetadata": Sage_ConstructMetadata,
"Sage_ConstructMetadataLite": Sage_ConstructMetadataLite,
# Utility nodes
"Sage_GetFileHash": Sage_GetFileHash
}
# A dictionary that contains the friendly/humanly readable titles for the nodes
NODE_DISPLAY_NAME_MAPPINGS = {
# Primitive nodes
"Sage_SetBool": "Set Bool",
"Sage_SetInteger": "Set Integer",
"Sage_SetFloat": "Set Float",
#Logic nodes
"Sage_LogicalSwitch": "Switch",
# Text nodes
"Sage_SetText": "Set Text",
"Sage_JoinText": "Join Text",
"Sage_TripleJoinText": "Join Text x3",
"Sage_CleanText": "Clean Text",
"Sage_ViewText": "View Text",
"Sage_PonyPrefix": "Add Pony v6 Prefixes",
# Model nodes
"Sage_UNETLoader": "Load Diffusion Model w/ Metadata",
"Sage_CheckpointLoaderSimple": "Load Checkpoint w/ Metadata",
"Sage_CheckpointLoaderRecent": "Load Recently Used Checkpoint",
"Sage_ModelInfo": "Model Info",
"Sage_CacheMaintenance": "Cache Maintenance",
"Sage_ModelReport": "Model Scan & Report",
# Lora stack nodes
"Sage_LoraStack": "Simple Lora Stack",
"Sage_LoraStackRecent": "Recent Lora Stack",
"Sage_LoraStackLoader": "Lora Stack Loader",
"Sage_CollectKeywordsFromLoraStack": "Lora Stack -> Keywords",
"Sage_LastLoraInfo": "Last Lora Info",
# Clip nodes
"Sage_DualCLIPTextEncode": "Prompts to CLIP",
"Sage_ConditioningZeroOut": "Zero Conditioning",
#"Sage_ConditioningOneOut": "One Conditioning",
"Sage_ConditioningRngOut": "Randomized conditioning",
# Sampler nodes
"Sage_KSampler": "KSampler w/ Sampler Info",
# Image nodes
"Sage_EmptyLatentImagePassthrough": "Empty Latent Passthrough",
"Sage_LoadImage": "Load Image w/ Size & Metadata",
"Sage_SaveImageWithMetadata": "Save Image w/ Added Metadata",
# Metadata nodes
"Sage_SamplerInfo": "Sampler Info",
"Sage_AdvSamplerInfo": "Adv Sampler Info",
"Sage_ConstructMetadata": "Construct Metadata",
"Sage_ConstructMetadataLite": "Construct Metadata Lite",
# Utility nodes
"Sage_GetFileHash": "Get Sha256 Hash"
}
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS', 'WEB_DIRECTORY']