tui: generate — ControlNet picker (units configuration) #141

Closed
opened 2026-04-14 20:13:17 +00:00 by claude-desktop · 0 comments
Collaborator

User story

As a user in ControlNet mode, I want to configure each ControlNet unit (image, preprocessor module, model, weight, guidance start/end) from the Generate screen, so that I can compose multi-unit ControlNet workflows from the terminal.

Background

The mode tab "controlnet" exists but selecting it currently leaves the params unchanged. GenerationParams carries controlnet_units: Vec<ControlNetUnit> (crates/loom-core/src/models/generation.rs). GTK has a ControlNet picker component at crates/loom-gtk/src/components/controlnet_picker/.

Acceptance criteria

Units section

  • When mode is ControlNet, render a "ControlNet units" section below the params panel
  • Each unit: image path · module · model · weight · guidance start/end
  • Empty state: (press 'a' to add a ControlNet unit)

Add / remove

  • a opens an inline editor for a new unit
  • dd chord on the focused unit removes it (with Confirm)
  • Up to 4 units (matches typical Forge limit)

Edit unit

  • Each editable field uses the existing param widget patterns:
    • image: file picker overlay (reuse pattern from init image)
    • module: combobox populated from bridge.list_controlnet_modules()
    • model: combobox populated from bridge.list_controlnet_models()
    • weight: number 0.0–2.0, ←/→ adjusts ±0.1
    • guidance_start / guidance_end: number 0.0–1.0, ←/→ adjusts ±0.05

Submission

  • On generate, units are passed through GenerationParams::controlnet_units
  • If mode is not ControlNet but units are non-empty, units are stripped at submission

Tests

  • Unit: add → edit → submit produces the expected JSON in the bridge call
  • Unit: switching modes preserves units in screen state but only includes them in submission when mode == ControlNet

Out of scope

  • Module-specific UI (e.g. depth preview, openpose skeleton overlay)
  • Per-unit preview image
  • IP-Adapter (handled separately via entities + LoRA flow)

References

  • crates/loom-core/src/models/generation.rs (ControlNetUnit, controlnet_units)
  • crates/loom-gtk/src/components/controlnet_picker/mod.rs (GTK reference)
  • crates/loom-tui/src/screens/generate.rs (mode tab handling)
## User story As a user in ControlNet mode, I want to configure each ControlNet unit (image, preprocessor module, model, weight, guidance start/end) from the Generate screen, so that I can compose multi-unit ControlNet workflows from the terminal. ## Background The mode tab "controlnet" exists but selecting it currently leaves the params unchanged. `GenerationParams` carries `controlnet_units: Vec<ControlNetUnit>` (`crates/loom-core/src/models/generation.rs`). GTK has a ControlNet picker component at `crates/loom-gtk/src/components/controlnet_picker/`. ## Acceptance criteria ### Units section - [ ] When mode is ControlNet, render a "ControlNet units" section below the params panel - [ ] Each unit: image path · module · model · weight · guidance start/end - [ ] Empty state: `(press 'a' to add a ControlNet unit)` ### Add / remove - [ ] `a` opens an inline editor for a new unit - [ ] `dd` chord on the focused unit removes it (with Confirm) - [ ] Up to 4 units (matches typical Forge limit) ### Edit unit - [ ] Each editable field uses the existing param widget patterns: - `image`: file picker overlay (reuse pattern from init image) - `module`: combobox populated from `bridge.list_controlnet_modules()` - `model`: combobox populated from `bridge.list_controlnet_models()` - `weight`: number 0.0–2.0, ←/→ adjusts ±0.1 - `guidance_start` / `guidance_end`: number 0.0–1.0, ←/→ adjusts ±0.05 ### Submission - [ ] On generate, units are passed through `GenerationParams::controlnet_units` - [ ] If mode is not ControlNet but units are non-empty, units are stripped at submission ### Tests - [ ] Unit: add → edit → submit produces the expected JSON in the bridge call - [ ] Unit: switching modes preserves units in screen state but only includes them in submission when mode == ControlNet ## Out of scope - Module-specific UI (e.g. depth preview, openpose skeleton overlay) - Per-unit preview image - IP-Adapter (handled separately via entities + LoRA flow) ## References - `crates/loom-core/src/models/generation.rs` (`ControlNetUnit`, `controlnet_units`) - `crates/loom-gtk/src/components/controlnet_picker/mod.rs` (GTK reference) - `crates/loom-tui/src/screens/generate.rs` (mode tab handling)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/loom#141
No description provided.