Files
kongo_junandClaude Fable 5 f25e3d6fa4 Add BlockSwapKrea2: hook-triggered swap for Krea 2 (Ostris Edit compatible)
Krea2OstrisEditModelPatch object-patches diffusion_model.forward and drives
block submodules directly (block.mod / block.attn / block.mlp), so the
forward-wrapper swap never fires on the reference-latent paths. Every Krea2
block path begins with block.mod and ends with block.mlp, so this node
triggers the swap with a forward_pre_hook on mod and a forward_hook on mlp.

Verified on RTX 4090 / ComfyUI 0.26.2 with krea2_turbo_fp8 (no LoRA),
blocks_to_swap=14: native, multi-reference and kv_cache paths all bit-exact
vs no-swap, 6.4 GB resident instead of 12.9 GB. Runtime LoRA and bf16-scale
checkpoints are documented as known-broken (CUDA invalid argument; shared
bake-path suspect, see README).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TCjmaeny4KRS2TzXyYEgZS
2026-07-13 20:30:48 +09:00

15 lines
434 B
TOML

[project]
name = "comfyui-jitblockswap"
description = "Block Swap (RAM Offload) node for native ComfyUI MODEL - run DiT models larger than VRAM by streaming transformer blocks from system RAM."
version = "0.2.0"
license = { file = "LICENSE" }
dependencies = []
[project.urls]
Repository = "https://github.com/lovemachine100/ComfyUI-JITBlockSwap"
[tool.comfy]
PublisherId = "kongo_jun"
DisplayName = "ComfyUI-JITBlockSwap"
Icon = ""