olob0/ComfyUI-Krea2BlockSwap ? reverse-engineered prompt
Reverse engineered prompt
Build me a ComfyUI custom node for the Krea 2 image model that lets it run on GPUs with limited VRAM by swapping transformer blocks into system RAM when they are not being used.
I want it to work as a simple node I can place between the Krea 2 loader and the sampler, with one main setting for how many blocks should stay offloaded while idle. It should move each block to the GPU right before it runs, then send it back to CPU right after, so the output stays the same as a normal run and there is no quality loss.
Please keep it easy to install in ComfyUI custom nodes, with no extra dependencies if possible. Make the default behavior safe and leave an option for non blocking transfers. If you need to, look up current ComfyUI docs online so the integration fits the usual custom node style.