AI4ArtsEd Vector Dimension Eliminator
Zeroing out embedding dimensions to find out what they meant
- conditioning
- conditioning
- dimension_info
AI4ArtsEd Vector Dimension Eliminator is a probing tool dressed up as a node: it takes a CONDITIONING tensor and surgically wrecks a slice of its embedding dimensions so you can see what the output does. Zero out dimensions 100–200 of your prompt embedding, sample, and compare with the intact version. If the image changes dramatically, those dimensions were carrying meaning; if nothing changes, they weren't. It's interpretability-by-destruction, the same spirit as ablation studies, aimed at the question "what does this embedding actually encode?"
It's not a utility you'll use in a production workflow - it's an experiment you run when you're curious, or when you're teaching (which, given this pack's arts-education origins, is probably the point). Every output is a hypothesis about the semantic structure of prompt embeddings.
How it works
The node extracts the token and pooled tensors from your conditioning, clones them, and modifies dimensions [start_dimension, start_dimension + num_dimensions) in every token and in the pooled output. The mode dropdown picks the destruction:
zero_out- set that slice to zero (the default).random- fill with noise scaled to half the embedding's standard deviation, preserving magnitude.average- fill with the global mean of the embedding.invert- flip the sign of those dimensions.
A smaller slice is a finer probe (dimensions 100–150), a larger one is a coarser ablation. Note that a typical SD/SDXL prompt embedding is only ~768–1280 dimensions wide, so start_dimension of 1000+ will silently hit the "out of bounds, no modification" path - the node warns and passes the conditioning through.
The inputs that matter
conditioning- any CONDITIONING.start_dimension,num_dimensions- the slice to modify.mode- which operation to apply.fill_value- here's the trap: the mode dropdown only exposes the four named modes, so this slider is effectively dead code. The source has a "custom fill value" branch, but you can't reach it from the UI. Leave it at 0.output_info- when true, the second output gets a detailed stats block (relative change, mean/std before/after, percentage of embedding modified).
Outputs: conditioning (the modified CONDITIONING) and dimension_info (a STRING report).
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/joeriben/ai4artsed_comfyui_nodes
# restart ComfyUI
Or search "AI4ArtsEd" in ComfyUI Manager. Pure torch + numpy, no extra deps, no network.
Common issues
fill_value seems to do nothing. Correct - it's unreachable through the UI because mode is always one of the four named options. Known quirk, not your mistake.
Nothing changes in the output image. Either your slice landed in low-information dimensions (try a different range), or the start index is out of bounds and it passed through unmodified (check the console warning, or turn on output_info and read the dimension_info string). It's also entirely possible the destroyed dimensions genuinely don't affect this model's output - that's a finding, not a failure.
It fires on every run. No cache-breaking here, so if upstream inputs change, the node re-runs - but for a probe, you usually want a fixed seed on the sampler and a single ablation at a time, or you can't tell what changed.
It's a niche, curiosity-driven node, and honest about its experimental status. If you want to feel like you're dissecting a neural network in a lab, it's a lot of fun. If you want a conditioning tool that improves images, this isn't it - this one asks questions instead of answering them.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| conditioning | CONDITIONING | — | |
| start_dimension | INT | 00–10000 | — |
| num_dimensions | INT | 1001–10000 | — |
| fill_value | FLOAT | 0.00-10–10 | — |
| mode | COMBO | zero_out | 4 options: zero_out, random, average, invert |
| output_infoopt | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | — |
| dimension_info | STRING | — |