Nodes/ComfyUI Layer Style/LayerColor: Negative
ComfyUI Node Runs on cloud

LayerColor: Negative

Negative

By chflame163·Created 3 years ago·Updated 4 days ago· 3,113
LayerColor: Negative
  • image
  • image
◄negative_channel▾►

LayerColor: Negative inverts an image - the photographic-negative "flip every value" operation. White becomes black, red becomes cyan, and so on. It sounds trivial, and for a plain full-color invert it is, but this node is a little more useful than that because it lets you choose what gets inverted, which turns it into a handy utility rather than a one-trick effect.

The controls are minimal:

  • negative_channel - an enum picking which channel(s) to invert. RGB flips the whole image (the classic negative). Mono inverts as a grayscale/luminance negative. R, G, and B invert just that single channel, leaving the other two alone.

Give it an image, get the inverted image back.

That per-channel option is the interesting part. Inverting a single channel produces those weird, striking false-color shifts - great for glitchy or surreal looks - while the Mono option is quietly practical: it's a fast way to flip a grayscale image, which matters when you're working with masks, depth maps, or any control image where "the values are backwards" is a real and common problem. If a depth map or a mask is inverted relative to what the downstream node expects, running it through Negative on Mono fixes it in one node without hunting for a dedicated invert utility.

Where it fits in a workflow: mostly as a small correction or a creative flourish. As a correction, it's the "flip this mask/depth/control image" step. As an effect, a full RGB invert gives you that instantly-recognizable negative look, and the single-channel inversions get you into cross-processed, psychedelic territory that pairs well with the pack's ChannelShake and ColorMap filters if you're chasing something deliberately off. It's not a node you'll use every day, but when you need it, nothing else is faster.

Install is the pack standard. Easiest is ComfyUI Manager - search ComfyUI Layer Style (or "LayerStyle"), install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/chflame163/ComfyUI_LayerStyle, then pip install -r requirements.txt from inside the folder using ComfyUI's Python, and restart. On a hosted ComfyUI it's usually preinstalled.

The one pack-wide thing worth flagging: Layer Style is known for import failures. You install it, restart, and the whole node set shows up red or missing. It's rarely any single node - it's a dependency clash. The pack pulls a heavy stack (transformers, onnxruntime, opencv), and one mismatched version - a stray transformers or tensorflow in the environment is the usual offender - takes the entire pack down on import. Fix it by reading the ComfyUI startup log for the traceback (it names the package that actually failed), reinstalling requirements against ComfyUI's own Python, and using Manager's Try Fix. If Negative is missing, so is every other LayerStyle node, and that shared import failure is the real problem underneath.

Category😺dzNodes/LayerColor

Inputs (2)

NameTypeDefaultDescription
imageIMAGE—
negative_channelCOMBO5 options: RGB, Mono, R, G, B

Outputs (1)

NameTypeDescription
imageIMAGE—