Nodes/CryptoNoise-Ksampler/πŸ” Crypto KSampler
ComfyUI Node

πŸ” Crypto KSampler

A secret handshake for your latent (the 'unforgeable' part is marketing)

By Shadowwalker0PΒ·Created 8 months agoΒ·Updated 8 months agoΒ· 3
πŸ” Crypto KSampler
  • model
  • positive
  • negative
  • latent_image
  • latent
  • signature
  • verification_info
β—„seed0β–Ί
β—„steps20β–Ί
β—„cfg8.0β–Ί
β—„sampler_nameβ–Ύβ–Ί
β—„schedulerβ–Ύβ–Ί
β—„denoise1.00β–Ί
β—„artist_keyyour_artist_name_hereβ–Ί
β—„crypto_blend0.50β–Ί
β—„shuffle_modeblock_8β–Ί

If you've seen the README for this one, you've seen the pitch: swap out your boring KSampler for the πŸ” Crypto KSampler, give it a secret artist_key, and every image you generate carries an "unforgeable, mathematically provable" signature of your authorship. Collision probability 10⁻⁷⁷! Court-ready!

Okay, breathe. I ran it, read the source, and here's the honest version: the mechanism is real and mildly clever, but it's a deterministic-noise blender, not a cryptographic watermarking system. Once you stop expecting courtroom-grade proof, it's actually a neat little node for one specific job - making your starting latent depend on a secret string you control.

What it actually does

The node is a drop-in KSampler replacement. All ten standard inputs - model, positive, negative, latent_image, seed, steps, cfg, sampler_name, scheduler, denoise - pass straight through to ComfyUI's own common_ksampler. The new part happens before sampling:

  1. Your artist_key gets SHA-256'd, and the first bytes become a deterministic seed.
  2. That seed generates random noise the shape of your latent, then permutes it (block or pixel shuffle) so the pattern is unique to your key.
  3. The shuffled noise is blended into the latent at crypto_blend strength.
  4. Sampling proceeds normally on the signed latent.

Since diffusion is chaotic about its starting noise, a different key gives you a different image even at the same seed. Same key + same seed + same everything gives you the same image. That's the whole trick. The outputs are latent (feed it to your VAE decode like normal), a signature string (CN-a1b2c3...), and verification_info - a JSON blob recording the key hash, blend, shuffle mode, and every generation parameter, for that "prove it in court" story.

The inputs that matter

You'll only touch three of them:

  • artist_key - your secret string. Default is your_artist_name_here, which is a public key everyone knows, so change it or you're signing with a shared pen.
  • crypto_blend - 0.0 = off, 0.5 = default, 1.0 = max. The tooltip calls 0.5 "imperceptible." The README's own table says 0.5 gives SSIM ~0.545 vs an unsigned image, which it calls "clearly different." Those two things cannot both be true. At 0.5 your image is visibly changed - treat this as a visible watermark, not an invisible one.
  • shuffle_mode - block_8 (default, fast), block_16, block_32, or pixel (fine-grained, and per the README 500ms+ slower). Only matters when blend is above zero.

Installing it

ComfyUI Manager β†’ search "CryptoNoise" β†’ Install β†’ restart. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/Shadowwalker0P/CryptoNoise-Ksampler
# restart ComfyUI

No model downloads, no GPU weights, nothing heavy. The requirements.txt pins torch and numpy (both already in ComfyUI) plus a pile of dev-tooling you can ignore.

Where people get burned

  • The "imperceptible" claim. At the default 0.5 blend you will notice. If you want subtle, drop to ~0.15–0.2 and accept the trade-off.
  • img2img fidelity. If you're feeding a real image in with denoise below 1, blending in half a latent of random noise mangles it. Keep blend low or skip signing on refinement passes.
  • The verification scheme is fragile. "Regenerate, compare SSIM β‰ˆ 1.0" sounds bulletproof until you remember that exact reproduction across machines is a coin flip - ComfyUI version, torch flags, xformers, all of it nudges pixels. An "attorney-sealed" workflow.json won't freeze your local environment.
  • The README admits the pixels themselves can be copied. Your "proof" is that you can regenerate the match; it stops nobody from stealing the image file.

Should you reach for it?

If you want a reproducible, secret-dependent starting noise without hand-rolling the math, sure - it works, installs clean, and the verification_info JSON is genuinely handy as a personal provenance record. If you want actual tamper-evident watermarking, you want a real scheme (invisible-watermark, C2PA-style metadata), because this is a secret seed with good PR. Treat the 10⁻⁷⁷ as what it is: a SHA-256 collision probability, not a promise about your art.

Categorysampling

Inputs (13)

NameTypeDefaultDescription
modelMODELβ€”
positiveCONDITIONINGβ€”
negativeCONDITIONINGβ€”
latent_imageLATENTβ€”
seedINT00–18446744073709550000Random seed for generation
stepsINT201–10000Number of sampling steps
cfgFLOAT8.00–100Classifier-free guidance scale
sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
denoiseFLOAT1.000–1Denoising strength
artist_keySTRINGyour_artist_name_hereYour secret artist identity. Keep this private! Like a password for your art. Used to derive cryptographic signature.
crypto_blendFLOAT0.500–1Signature strength: 0.0=off, 0.5=recommended (imperceptible), 1.0=maximum
shuffle_modeoptCOMBOblock_8Shuffle granularity: block_8=recommended (fast & effective)

Outputs (3)

NameTypeDescription
latentLATENTβ€”
signatureSTRINGβ€”
verification_infoSTRINGβ€”