Add `Remove Hooks From Cond` Node
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 155
Description
### Feature Idea
A node that takes in positive and negative conditioning as input and outputs both with all attached hooks removed.
The Lora is often no longer necessary after the first pass but it seems to contribute to a large VRAM usage spike when trying to do 2nd pass after upscaling.
### Existing Solutions
This can be currently avoided by creating 2 sets of conditioning differing in the presence of Lora hooks and feeding the one with hooks into the first pass KSampler and the other for everything afterwards. This approach works but requires a lot of additional nodes and leads to a lot of clutter when a single node simply removing the hooks could replace all of it.
This is with hook present for the entire workflow:

Vram usage reaches 100% (RTX 3090 24GB) on second cycle of iterative upscaling, resolution 1280.0x1920.0.
And this is with hook present only for the first pass (the first sampling of 16 steps):

Vram usage tops off at 57%.
### Other
Here is my workflow configured to use 2 separate conditioning sets with and without lora. You can replace the `basic_pipe` input in iterative upscale with the `basic_pipe` from `1st pass` to see the result of keeping the hooks. The nodes coloured red are used to create the secondary conditioning set without lora hooks and could be replaced with the proposed node. This workflow uses `ImpactPack`, `InspirePack`, `WAS's node suite` and Pythongosssss's `Custom Scripts` node packs, but they are not necessary for implementing the described solution.
[RegionLoraTest.json](https://github.com/user-attachments/files/18416345/RegionLoraTest.json)
Contributor guide
Assessment
This issue has not been assessed yet.