Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-ARZUMATA > ImageCacher

ComfyUI Node: ImageCacher

Class Name

ImageCacher

Category
cache
Author
arzumata (Account age: 2640days)
Extension
ComfyUI-ARZUMATA
Latest Updated
2026-05-21
Github Stars
0.01K

How to Install ComfyUI-ARZUMATA

Install this extension via the ComfyUI Manager by searching for ComfyUI-ARZUMATA
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-ARZUMATA in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

ImageCacher Description

Caches the last image, returning it for matching Python hashes and replacing it when hashes differ.

ImageCacher:

ImageCacher stores the most recently received image and uses Python’s hash() result to decide whether to return the stored image or replace it. This can preserve the previous image object when the same hash is seen again. The check does not compare image pixels, so it should not be treated as a reliable way to detect whether an image’s visual content has changed. The source also does not establish that this node speeds up earlier image-generation steps.

ImageCacher Input Parameters:

image

The required IMAGE to pass through the node. When its hash() result matches the stored hash, the node returns the previously stored image; otherwise, it stores and returns the image you supplied. This means the result depends on the hash comparison, not a pixel-by-pixel comparison. The interface specifies no default, minimum, maximum, or selectable options for this parameter.

ImageCacher Output Parameters:

IMAGE

The image returned by the node. It is the supplied image when the hash differs from the stored hash, or the previously stored image when the hashes match. The output is intended to carry an IMAGE into a later step of your workflow. The implementation does not show any image processing or visual changes before returning it.

ImageCacher Usage Tips:

  • Connect an existing IMAGE to image, then connect IMAGE to the next node where you need the image.
  • Use this node when retaining the last image object is useful to your workflow. Do not rely on it to identify identical-looking images or detect every pixel change; its decision is based on hash(), not image content.
  • There are no cache-size, refresh, or other configuration settings in the supplied interface. If you need to confirm which image reached a later step, inspect that step’s result.

ImageCacher Common Errors and Solutions:

TypeError: unhashable type: ...

  • Explanation: The implementation calls hash(image). This error can occur if the supplied object does not support hashing.
  • Solution: Check that the connection supplies an IMAGE accepted by your environment. If a valid image still triggers the error, this implementation needs a different comparison method; the node has no setting that changes it.

AttributeError: type object ' ImageCacher' has no attribute 'image_hash'

  • Explanation: The IS_CHANGED method reads image_hash through its class-method argument, while image_hash is initialized on individual node instances. A call on the class may therefore raise this error.
  • Solution: This requires an implementation fix. Changing the image or reconnecting the node does not resolve the mismatch shown in the source.

Expected ... outputs, but received ... or an output-shape validation error

  • Explanation: The interface declares one IMAGE output, but cache returns the image directly rather than wrapping it in a one-item tuple. Whether this causes an error depends on how the host validates node results.
  • Solution: Confirm the error is reported for ImageCacher. If it is, the implementation needs to return a one-item tuple in both branches; there is no interface setting to correct the return shape.

A changed image appears to return the previous image

  • Explanation: The node compares hashes rather than pixels. A matching hash makes it return the stored image, even though the code has not checked whether the images look the same.
  • Solution: Inspect the image before and after this node. For workflows that must detect visual changes, use a content-based comparison or an implementation designed for that purpose.

ImageCacher Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-ARZUMATA
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

ImageCacher