Anymatix Zoe Depth Anything
Fully-offline ZoeDepth depth maps — loads its weights from a local path, never the Hub
- image
- IMAGE
Depth maps are the quiet backbone of a lot of ComfyUI work - ControlNet depth conditioning, relighting, video-to-video structure. And the usual way to get one is a comfyui_controlnet_aux preprocessor, which happily phones home to Hugging Face to fetch its weights mid-run. That's fine until you're running fully offline or on a locked-down box, at which point your depth preprocessor is dead weight. AnymatixZoeDepthAnythingPreprocessor is built for exactly that case: it runs ZoeDepth, but every weight comes from a local path, so with HF_HUB_OFFLINE=1 it never touches the network. The README is explicit - these offline preprocessors are a deliberate part of the pack.
The model behind it is Intel's ZoeDepth-NYU-KITTI, the combined indoor/outdoor variant, loaded through Hugging Face transformers (ZoeDepthForDepthEstimation plus its image processor) with local_files_only=True so there's no fallback attempt to hit the Hub. One honest note from the KB before you get excited: ZoeDepth predicts metric depth (real-world scale), and for plain depth-ControlNet conditioning the community verdict has long been that a relative-depth model like Depth Anything is the better default - ZoeDepth's real-world scale came at the cost of edge sharpness, and sharp edges are what conditioning actually needs. Reach for ZoeDepth when a downstream consumer genuinely wants distances (measurement, some relight and geometry pipelines), not because it sounds more accurate. And whatever your job, the wider depth-estimation context lives in the KB's depth-anything and depth-estimation panels; this node is the "run it anywhere, including nowhere" version of that idea.
The three-file dance
Here's where this node is unusual and you should read before wiring it. The preprocessor doesn't take "pick a model from a dropdown." It takes three STRING inputs because a Hugging Face model is three files:
- config_name - the
config.json - model_name - the
model.safetensorsweights - preprocessor_config_name - the
preprocessor_config.json
Each is a local path, typically fed by the pack's URL fetcher (the weights are fetched and verified once, then reused). The node then assembles them into the layout the transformers loader expects, under models/zoedepth/Intel--zoedepth-nyu-kitti/ - copying (or hard-linking) your three files into place with those exact names if they aren't already laid out that way. If any of the three is missing, it errors with a message naming which file - a genuinely helpful failure.
Plus the ordinary image inputs:
- image (IMAGE) - the frame to estimate.
- environment (
indoor/outdoor, defaultindoor) - honest note: the loader currently uses the combined NYU-KITTI weights, and the code accepts but doesn't act on this choice. Don't expect the toggle to swap models in this build. - resolution (INT, default 512) - a processing hint. The depth output always gets resized back to the input image's dimensions at the end; setting this to 0 disables that resize-back entirely. In practice you can leave it alone.
What comes out
One IMAGE, and the preprocessing is opinionated: the raw depth is contrast-stretched using the 2nd–85th percentiles (which kills the blown-out range that makes raw depth maps look flat), then inverted so near is white and far is black - the convention depth ControlNets expect - and repeated to three channels for the IMAGE type. Wire it into a depth ControlNet or a relight node and you're done. Brights are near, darks are far, and the output is ready for the aux consumers.
Install and gotchas
Shipped in anymatix-comfy-nodes under the "Anymatix" category. Manager: search "anymatix-comfy-nodes", install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/Anymatix/anymatix-comfy-nodes
It needs transformers, which is already a ComfyUI dependency. The gotcha is the same one that makes this node exist: it's only offline-friendly if the three files are actually local - which means a fetcher (or you) must have downloaded them once while online. On a fresh machine that has never fetched them, HF_HUB_OFFLINE=1 plus this node fails with a file-not-found, not a network error. Fetch once, then it's genuinely offline forever.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| config_name | STRING | — | |
| model_name | STRING | — | |
| preprocessor_config_name | STRING | — | |
| environment | COMBO | indoor | 2 options: indoor, outdoor |
| resolution | INT | 51264–16384 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |