Nodes/ComfyUI-CustomNodePacks/C2C Vault (protected subgraph, saves)
ComfyUI Node

C2C Vault (protected subgraph, saves)

The Vault Node That Actually Saves — and Why the Other One Doesn't

By Code2Collapse·Created 8 months ago·Updated about 18 hours ago· 59
C2C Vault (protected subgraph, saves)
    • out_0
    • out_1
    • out_2
    • out_3
    • out_4
    • out_5
    • out_6
    • out_7
    • out_8
    • out_9
    • out_10
    • out_11
    • out_12
    • out_13
    • out_14
    • out_15
    • out_16
    • out_17
    • out_18
    • out_19
    • out_20
    • out_21
    • out_22
    • out_23
    • out_24
    • out_25
    • out_26
    • out_27
    • out_28
    • out_29
    • out_30
    • out_31
    • out_32
    • out_33
    • out_34
    • out_35
    • out_36
    • out_37
    • out_38
    • out_39
    • out_40
    • out_41
    • out_42
    • out_43
    • out_44
    • out_45
    • out_46
    • out_47
    • out_48
    • out_49
    • out_50
    • out_51
    • out_52
    • out_53
    • out_54
    • out_55
    • out_56
    • out_57
    • out_58
    • out_59
    • out_60
    • out_61
    • out_62
    • out_63
    • out_64
    • out_65
    • out_66
    • out_67
    • out_68
    • out_69
    • out_70
    • out_71
    • out_72
    • out_73
    • out_74
    • out_75
    • out_76
    • out_77
    • out_78
    • out_79
    • out_80
    • out_81
    • out_82
    • out_83
    • out_84
    • out_85
    • out_86
    • out_87
    • out_88
    • out_89
    • out_90
    • out_91
    • out_92
    • out_93
    • out_94
    • out_95
    • out_96
    • out_97
    • out_98
    • out_99
    • out_100
    • out_101
    • out_102
    • out_103
    • out_104
    • out_105
    • out_106
    • out_107
    • out_108
    • out_109
    • out_110
    • out_111
    • out_112
    • out_113
    • out_114
    • out_115
    • out_116
    • out_117
    • out_118
    • out_119
    • out_120
    • out_121
    • out_122
    • out_123
    • out_124
    • out_125
    • out_126
    • out_127
    • out_128
    • out_129
    • out_130
    • out_131
    • out_132
    • out_133
    • out_134
    • out_135
    • out_136
    • out_137
    • out_138
    • out_139
    • out_140
    • out_141
    • out_142
    • out_143
    • out_144
    • out_145
    • out_146
    • out_147
    • out_148
    • out_149
    • out_150
    • out_151
    • out_152
    • out_153
    • out_154
    • out_155
    • out_156
    • out_157
    • out_158
    • out_159
    • out_160
    • out_161
    • out_162
    • out_163
    • out_164
    • out_165
    • out_166
    • out_167
    • out_168
    • out_169
    • out_170
    • out_171
    • out_172
    • out_173
    • out_174
    • out_175
    • out_176
    • out_177
    • out_178
    • out_179
    • out_180
    • out_181
    • out_182
    • out_183
    • out_184
    • out_185
    • out_186
    • out_187
    • out_188
    • out_189
    • out_190
    • out_191
    • out_192
    • out_193
    • out_194
    • out_195
    • out_196
    • out_197
    • out_198
    • out_199
    • out_200
    • out_201
    • out_202
    • out_203
    • out_204
    • out_205
    • out_206
    • out_207
    • out_208
    • out_209
    • out_210
    • out_211
    • out_212
    • out_213
    • out_214
    • out_215
    • out_216
    • out_217
    • out_218
    • out_219
    • out_220
    • out_221
    • out_222
    • out_223
    • out_224
    • out_225
    • out_226
    • out_227
    • out_228
    • out_229
    • out_230
    • out_231
    • out_232
    • out_233
    • out_234
    • out_235
    • out_236
    • out_237
    • out_238
    • out_239
    • out_240
    • out_241
    • out_242
    • out_243
    • out_244
    • out_245
    • out_246
    • out_247
    • out_248
    • out_249
    • out_250
    • out_251
    • out_252
    • out_253
    • out_254
    • out_255
    ◄vault_id►
    ◄vault_payload►

    There are two C2C Vault nodes and they look identical in the Add Node menu. C2C Vault (protected subgraph, saves) is the one that runs when nothing is wired after it - and if your sealed workflow ends in a Save Image, that difference is the whole ballgame.

    You get one of these without choosing it. Seal a selection with Save Image inside it and the pack hands you this node; seal a chunk in the middle of a pipeline and you get the plain one. The trap is the middle case that isn't: you seal your whole workflow, the inside ends in a save or a preview, nothing reads the vault's outputs, and the plain vault node cheerfully does nothing. No error, no file, no obvious reason.

    Why that happens

    ComfyUI's scheduler works backwards from output nodes. A node nobody consumes never gets asked for its outputs, so it never runs - that's the same caching rule that makes a graph fast, and it's covered properly in the node-plumbing layer of the engine.

    A vault hides that from you, because the thing with nothing wired to it isn't an obvious dead Save Image at the end of your graph. It's a single node labelled Vault that looks perfectly healthy.

    C2C_SecureSubgraphOutput is the same class with OUTPUT_NODE = True. Output nodes always execute, which is exactly the semantics you want for a vault whose job is to write a file or show a preview. That's the entire difference between this and its sibling - one flag, opposite behaviour.

    Inputs and outputs

    Same shape as the other vault node. Two required strings: vault_id and vault_payload. The payload is the AES-256-GCM ciphertext of the inside (format v2, password stretched with Argon2id); the id identifies the vault for its notes and key bookkeeping. Both default to empty and the node refuses to run when the payload is blank, with This C2C Vault is empty: lock a selection or a subgraph first - the message you get if you add the node from the menu rather than creating a vault.

    Outputs are out_0 through out_255, all typed ANY. That's headroom: the expansion fills as many as the inside produced and pads the rest. The sockets you actually use are the wires that crossed your selection when you sealed it, and they carry the same names they had before.

    You don't build these by hand. Select the nodes, right-click the canvas, 🔒 Seal as C2C Vault (runs on your install and any install you authorize) or 🔒 Lock as C2C Vault (asks for the password once per browser tab). Then the inside is encrypted, runs on ComfyUI's own scheduler like any subgraph, and reopening it for edits costs the password plus a 6-digit authenticator code.

    Installing it

    Manager → search CustomNodePacks, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Code2Collapse/ComfyUI-CustomNodePacks.git
    

    The one dependency that matters for anything vault-shaped is cryptography>=41.0 (AES-GCM). If you're not installing the pack's whole requirements file - and you probably shouldn't be, that file also pulls opencolorio, timm and einops - install just that:

    pip install "cryptography>=41.0"
    

    Restart, then check the console for the pack's 115 nodes loaded (… Vault 6 …) line. Silence means an import died.

    Where people get burned

    Nothing is saved. First thing to check is which node you have. If the vault's inside ends in a save or preview and the node's outputs go nowhere, you want this variant.

    The run wants a password you can't give it. A Locked vault asks per browser tab, which is fine when you're sitting there and awkward for anything unattended - schedules and webhooks fire server-side. Seal for authorized installations instead if the vault has to run by itself.

    The vault refuses to run at all. If a run fails claiming custom nodes are missing, click Install on the vault node: it lists the missing classes and asks before installing anything. C2C_VAULT_NATIVE=off in the environment also refuses native vault execution outright, which is worth knowing if someone handed you a machine.

    Its scope is narrower than you'd guess. A vault keeps your nodes out of the workflow file, browser storage, history, messages and saved images - that's the real win, given every ComfyUI PNG otherwise carries the whole graph as text. It does not stop anyone who can run the vault: it has to decrypt to execute, so whoever can run it can in principle extract it. Treat it as a lock on the file and the editing UI, not a secret from the machine.

    One last thing: because it's an output node, this one fires on every queue, whether or not you touched its branch. That's the price of "it always saves," and it's why the plain vault node still exists.

    Category🐺 C2C/🧰 Core/Vault

    Inputs (2)

    NameTypeDefaultDescription
    vault_idSTRING—
    vault_payloadSTRING—

    Outputs (256)

    NameTypeDescription
    out_0*—
    out_1*—
    out_2*—
    out_3*—
    out_4*—
    out_5*—
    out_6*—
    out_7*—
    out_8*—
    out_9*—
    out_10*—
    out_11*—
    out_12*—
    out_13*—
    out_14*—
    out_15*—
    out_16*—
    out_17*—
    out_18*—
    out_19*—
    out_20*—
    out_21*—
    out_22*—
    out_23*—
    out_24*—
    out_25*—
    out_26*—
    out_27*—
    out_28*—
    out_29*—
    out_30*—
    out_31*—
    out_32*—
    out_33*—
    out_34*—
    out_35*—
    out_36*—
    out_37*—
    out_38*—
    out_39*—
    out_40*—
    out_41*—
    out_42*—
    out_43*—
    out_44*—
    out_45*—
    out_46*—
    out_47*—
    out_48*—
    out_49*—
    out_50*—
    out_51*—
    out_52*—
    out_53*—
    out_54*—
    out_55*—
    out_56*—
    out_57*—
    out_58*—
    out_59*—
    out_60*—
    out_61*—
    out_62*—
    out_63*—
    out_64*—
    out_65*—
    out_66*—
    out_67*—
    out_68*—
    out_69*—
    out_70*—
    out_71*—
    out_72*—
    out_73*—
    out_74*—
    out_75*—
    out_76*—
    out_77*—
    out_78*—
    out_79*—
    out_80*—
    out_81*—
    out_82*—
    out_83*—
    out_84*—
    out_85*—
    out_86*—
    out_87*—
    out_88*—
    out_89*—
    out_90*—
    out_91*—
    out_92*—
    out_93*—
    out_94*—
    out_95*—
    out_96*—
    out_97*—
    out_98*—
    out_99*—
    out_100*—
    out_101*—
    out_102*—
    out_103*—
    out_104*—
    out_105*—
    out_106*—
    out_107*—
    out_108*—
    out_109*—
    out_110*—
    out_111*—
    out_112*—
    out_113*—
    out_114*—
    out_115*—
    out_116*—
    out_117*—
    out_118*—
    out_119*—
    out_120*—
    out_121*—
    out_122*—
    out_123*—
    out_124*—
    out_125*—
    out_126*—
    out_127*—
    out_128*—
    out_129*—
    out_130*—
    out_131*—
    out_132*—
    out_133*—
    out_134*—
    out_135*—
    out_136*—
    out_137*—
    out_138*—
    out_139*—
    out_140*—
    out_141*—
    out_142*—
    out_143*—
    out_144*—
    out_145*—
    out_146*—
    out_147*—
    out_148*—
    out_149*—
    out_150*—
    out_151*—
    out_152*—
    out_153*—
    out_154*—
    out_155*—
    out_156*—
    out_157*—
    out_158*—
    out_159*—
    out_160*—
    out_161*—
    out_162*—
    out_163*—
    out_164*—
    out_165*—
    out_166*—
    out_167*—
    out_168*—
    out_169*—
    out_170*—
    out_171*—
    out_172*—
    out_173*—
    out_174*—
    out_175*—
    out_176*—
    out_177*—
    out_178*—
    out_179*—
    out_180*—
    out_181*—
    out_182*—
    out_183*—
    out_184*—
    out_185*—
    out_186*—
    out_187*—
    out_188*—
    out_189*—
    out_190*—
    out_191*—
    out_192*—
    out_193*—
    out_194*—
    out_195*—
    out_196*—
    out_197*—
    out_198*—
    out_199*—
    out_200*—
    out_201*—
    out_202*—
    out_203*—
    out_204*—
    out_205*—
    out_206*—
    out_207*—
    out_208*—
    out_209*—
    out_210*—
    out_211*—
    out_212*—
    out_213*—
    out_214*—
    out_215*—
    out_216*—
    out_217*—
    out_218*—
    out_219*—
    out_220*—
    out_221*—
    out_222*—
    out_223*—
    out_224*—
    out_225*—
    out_226*—
    out_227*—
    out_228*—
    out_229*—
    out_230*—
    out_231*—
    out_232*—
    out_233*—
    out_234*—
    out_235*—
    out_236*—
    out_237*—
    out_238*—
    out_239*—
    out_240*—
    out_241*—
    out_242*—
    out_243*—
    out_244*—
    out_245*—
    out_246*—
    out_247*—
    out_248*—
    out_249*—
    out_250*—
    out_251*—
    out_252*—
    out_253*—
    out_254*—
    out_255*—