Load Base64 Image
Getting a picture into ComfyUI without a file on disk
- IMAGE
- MASK
This one isn't a safety checker itself - it's plumbing, and it's bundled in the same pack as CompVisSafetyChecker and FalconsAISafetyChecker for a practical reason. If you're driving a moderation workflow through ComfyUI's API rather than clicking around the UI, you usually don't have a file sitting on disk to hand it - you have raw image bytes coming from wherever the image originated (a user upload, another service). ComfyUI's normal LoadImage node wants a filename it can find in its input/ folder, which means uploading first and then referencing it. loadImageBase64 skips that entirely: give it a base64 string directly in the workflow JSON, and it decodes straight to an image tensor.
That matters most when you're calling ComfyUI headlessly - queue a prompt via the API with the image data embedded right in the graph, no separate upload call, nothing left over to clean up afterward. If you're checking incoming images for NSFW content before doing anything else with them (the obvious use of this pack), this is the node that gets the image into the graph in the first place, upstream of whichever safety checker you're using.
How it works
It decodes the base64 payload and converts it into the same tensor format ComfyUI's built-in LoadImage produces - same shape, same downstream compatibility. Like that core node, it also derives a mask: if the source image carries an alpha channel, that becomes your MASK; if it doesn't, you get a blank one. For a pure safety-check workflow you'll likely never touch the MASK output - it only matters if you're also doing inpainting or compositing on the same image.
The inputs and outputs that matter
base64_data(STRING, default empty) - the only input, and the whole node. Paste or feed in a base64-encoded image string.
One gotcha worth knowing before you hit it: if your source string still has a data-URL prefix on it (data:image/png;base64,...), strip that first. That prefix trips up base64 image loaders across the board, this one included, since the decoder is expecting pure base64, not the URL wrapper browsers and some APIs like to include.
Outputs: IMAGE and MASK. Wire IMAGE into CompVisSafetyChecker or FalconsAISafetyChecker's image input to complete the loop - that's the whole point of having this node in a safety-checker pack.
How to install it
It comes with the same pack as the two checker nodes - no separate install. Via ComfyUI Manager: search ComfyUI Safety Checker, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/shabri-arrahim/ComfyUI-Safety-Checker
cd ComfyUI-Safety-Checker
pip install -r requirements.txt
Unlike its two siblings, this node doesn't need a model download - it's plain Python decoding, no weights involved. Restart ComfyUI and it's ready to use immediately.
Common issues & troubleshooting
Decode errors or a broken/garbled image. Almost always a malformed base64 string - check you haven't accidentally included the data:image/...;base64, prefix, truncated the string, or double-encoded it somewhere in your pipeline before it reached ComfyUI.
Can't find it in the node search. It's filed under SafetyChecker/utils/LoadImage in the category tree, which is a fairly buried spot for something that's really a general-purpose utility - if you're browsing by category rather than typing into the node search box, look under "SafetyChecker" first, not the top-level "image" or "loaders" categories where you'd expect a load-image node to live.
Node doesn't show up at all after cloning. Same as the rest of this pack - confirm the repo actually landed in custom_nodes/ and restart the ComfyUI process; a page refresh won't pick up a newly installed custom node.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| base64_data | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |