ComfyUI Node

Objectness

The OWL-ViT node with no text prompt (and why that's fine)

By Jannled·Created about a year ago·Updated about a year ago· 0
Objectness
  • owlModel
  • image
  • BBoxes
  • Objectnesses
  • Labels

No text prompt. That's the part that catches everyone who reaches for an OWL-ViT pack expecting "find the cat" - and it's the whole point of this node.

OWL-ViT's headline trick is grounded detection: you give it a phrase, it finds matching objects. This node does the other half of the model, the part the marketing never mentions - the objectness head. That's a class-agnostic detector. It looks at an image and returns "there's probably something here, roughly this shape," with no opinion about what the thing is. If you've used automatic image segmentation or dataset-prep tools, it's the same vibe: a proposal generator, not a labeler. It's genuinely useful for preprocessing, cropping subjects, or feeding regions to a downstream node - you just shouldn't expect semantic labels out of it.

How it works

The node takes the owlModel from OWL_Load_Model and an image from any regular image source, then runs a hand-rolled version of OWLv2's forward pass:

  1. The image goes through the model's image_embedder, producing a feature map where every spatial patch of the image gets a vector.
  2. The objectness_predictor scores each patch on "is there an object here," and the box_predictor proposes a box for it.
  3. Everything is post-processed with threshold=0, which means every candidate passes - nothing gets filtered out at this stage. The filtering is left to the visualizer node downstream.

What comes out:

  • BBoxes (BOXES) - the proposed boxes, in the image's original pixel coordinates.
  • Objectnesses (CONFIDENCES) - the raw objectness logits, one per box.
  • Labels (LABELS) - in class-agnostic mode this is essentially a constant, and the shipped visualizer ignores it entirely. Don't build anything that depends on it.

Wire the first two into OWL_BBox_Visualizer (image, boxes, confidences) and you'll actually see what the model found.

The honest caveats

This pack runs the model in pure class-agnostic mode - there is no text input anywhere in the graph, and the node hardcodes the objectness path rather than the grounded path. If you specifically want "detect every instance of X," this won't do it. It's a region proposer, full stop. For that you'd want a proper grounded-detection workflow.

Other things worth knowing:

  • It re-runs the loader's model load on every queue run. ComfyUI caches node instances, but this pack's loader rebuilds the model each time (its cache dict is dead code), so inference runs are a few seconds slower than they should be. Annoying, not fatal.
  • It's a GPU node. On CPU the model loads and technically works, but a 600M-parameter vision transformer over a feature map is not something you want to wait on.
  • Boxes are absolute pixel coordinates, matched to the input image's height and width. That's convenient - the visualizer can draw them directly - but it means resizing between the loader and this node will silently break the mapping.

For what it is - a fast, local, no-API object proposal stage in your graph - it does the job. Just know the boundary: it tells you where things are, never what they are.

CategoryOWL

Inputs (2)

NameTypeDefaultDescription
owlModelOWL_MODELUse Node OWL/Load OWL Model as the input
imageIMAGEThis is an image

Outputs (3)

NameTypeDescription
BBoxesBOXES
ObjectnessesCONFIDENCES
LabelsLABELS