ποΈ Gimbal Semantic Slider (PCA)
PCA-based dials for one attribute at a time
- latent_batch
- base_latent
- modified_latent
- pc_preview
The pitch for GimbalSemanticSlider is the dream of image editing: dial one attribute without touching the rest. Instead of rewriting your prompt and hoping, it finds the directions your batch of images actually varies along, then lets you push a single one of those directions up or down. It's the StyleGAN "latent slider" idea (GanSpace-style PCA on a latent batch) dropped into ComfyUI.
How it works
You feed it latent_batch - a batch of latents, ideally several variations of the same scene, generated with slightly different prompts - and base_latent, the single latent you want to modify. The node runs PCA over the batch's covariance to find the principal components, the axes of maximum variance: PC1 might be overall brightness, PC2 warm-vs-cool, PC3 amount of detail. Then pc_index (1β10, default 1) picks which axis to slide and slider_value (β5 to +5) says how far. Β±1 is roughly one standard deviation along that axis. orthogonalize (off by default) projects the PC direction perpendicular to your base before applying it, which keeps the slide from dragging along other components.
Outputs: modified_latent (your base pushed along that axis) and pc_preview - a latent that visualizes the pure direction itself, handy for seeing what a component actually encodes before you commit.
The key insight for getting good results: the components you get are only as meaningful as the batch you feed. Eight images of the same room at different brightnesses will put "brightness" on PC1; eight unrelated images give you components that don't correspond to anything you'd want to slide.
When you'd reach for it
When you've got a specific attribute to shift and no clean prompt word for it. Generate a small batch, decode the pc_previews to see which component is "the thing," then slide that one on a single base latent and refine at low denoise. It's also the natural partner for GimbalManifold_Explorer's batch output - take a grid, find the component you like, push it further.
Installing
Standard pack install: ComfyUI Manager β search "Gimbal-comfy" β install β restart, or git clone https://github.com/FormAndNoise/Gimbal-comfy into ComfyUI/custom_nodes. Dependencies are torch/numpy/pillow, already bundled; nothing downloads. (The README's clone URL is stale - FormAndNoise/Gimbal-comfy is live.)
Where people get burned
Batch quality is everything. A batch of one is meaningless (PCA needs variance), and a batch of latents from wildly different scenes produces components you can't interpret. Also expect smaller batches to give noisier axes - the pack's own docs recommend at least 4, and 8 is noticeably steadier. Don't overslide: slider values past Β±2 usually drift the latent out of distribution and you get fried artifacts instead of a dialed attribute - that's your cue to run a GimbalLatentStabilizer after. And one reality check: you'll see this same node listed as Gimbal_SemanticSlider - identical class, same behavior. This is a genuinely fun, functional node; it's just that "one attribute at a time" is doing a lot of work in the marketing, and in practice the attributes PCA finds are whatever your batch happened to vary along.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| latent_batch | LATENT | β | |
| base_latent | LATENT | β | |
| pc_index | INT | 11β10 | β |
| slider_value | FLOAT | 0.00-5β5 | β |
| orthogonalize | BOOLEAN | false | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| modified_latent | LATENT | β |
| pc_preview | LATENT | β |