π Gimbal Cross-Modal Bridge (Text-to-Latent)
Turning 'make it cyberpunk' into a latent direction β with caveats
- base_latent
- conditioning
- target_vector
- origin_vector
The pitch is seductive: type "dark cool neon cyberpunk cinematic" into a box, and the node hands you a latent vector pointing in that direction, ready to steer your existing image toward it. That's the dream behind Gimbal Cross-Modal Bridge, the text-to-latent instrument in the Gimbal-comfy suite by Form & Noise. The reality is worth understanding before you trust it, because the naming oversells what the default mode actually does.
Here's the thing you need to know up front: the input is called llm_instruction, but there is no LLM involved. The default Keyword_Heuristics mode splits your sentence into tokens, looks each one up in a built-in table of ~dozens of semantic channel signatures, and adds a per-channel offset to your latent. Each matched keyword contributes a fixed nudge to specific latent channels - "warm" nudges some, "dark" nudges others - and the sum becomes the steering delta. It's a calibrated lookup table, not language understanding. That's not a dealbreaker - it's actually deterministic and cheap - but phrase your instructions in vocabulary the table knows, or you get nothing.
How it works
You feed it base_latent (your starting point) and an llm_instruction. It returns two latents: target_vector (base + the keyword delta) and origin_vector (an untouched copy of base). That pairing is deliberate - the pack's canonical workflow wires these into a Compass Pro as its target_latent and origin_latent, letting you steer toward the text direction at a strength you control, or switch to Orthogonal_Projection so the steering repaints atmosphere without moving your subject's geometry.
The three mapping_mode options, honestly labeled:
- Keyword_Heuristics (default) - the lookup-table nudge above. Reliable, zero cost, but only understands its baked-in vocabulary. Unknown words are silently ignored (with a console warning).
- Embedding_Projection - the "real" text-to-latent path. It takes a
conditioninginput, reads the CLIP pooled output, and pushes it through a small MLP into the latent channel space. The catch: that projector only works if trained weights exist atmodels/crossmodal_proj_<dim>_to_<C>.ptinside the pack - otherwise you get an untrained random projection, i.e. garbage. Treat this mode as experimental unless you've trained a projector yourself. - Manual_JSON - you write the channel offsets yourself as JSON. Maximum control, zero magic, and the honest fallback when keywords aren't enough.
Using it
The inputs that matter: llm_instruction, base_latent, and mapping_mode. Leave conditioning unplugged unless you're deliberately testing Embedding_Projection. Outputs target_vector and origin_vector both feed into a Compass Pro - that pairing is where the real value is, because the bridge alone just nudges channels.
Common issues
If your instruction changes nothing, you hit words outside the signature table - try simpler, common adjectives ("dark", "warm", "neon", "cinematic"). If Embedding_Projection gives you noise, you're running the untrained projector; switch back to Keyword_Heuristics. And follow the pack's standard refinement rule after steering: a KSampler at denoise 0.45β0.60, CFG dropped to ~3.5β4.5, or the injected direction gets overcooked.
Install
# ComfyUI Manager β search "Gimbal"
# or:
cd ComfyUI/custom_nodes
git clone https://github.com/FormAndNoise/Gimbal-comfy
pip install -r Gimbal-comfy/requirements.txt
Restart ComfyUI; find it under Add Node β Gimbal/Flight Instruments. Just torch, numpy, pillow - no model downloads, no API keys.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| llm_instruction | STRING | β | |
| base_latent | LATENT | β | |
| mapping_mode | COMBO | Keyword_Heuristics | 3 options: Keyword_Heuristics, Embedding_Projection, Manual_JSON |
| conditioningopt | CONDITIONING | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| target_vector | LATENT | β |
| origin_vector | LATENT | β |