Commit Graph
3 Commits
Author SHA1 Message Date
Krishi Attri 2582dd907a fix: handle lazy/GGUF flow models in HiCacheModelPatch (issue #1)
pipeline.models[key] is None at patch time for GGUF Trellis2 pipelines
(Aero-Ex/ComfyUI-Trellis2-GGUF) that lazy-load the flow DiT inside the
sampler. nn.Module.__setattr__ only routes real Modules into _modules, so
self.inner = None became a plain __dict__ attribute that nn.Module.__getattr__
never searches, and the fallback raised 'object has no attribute inner'.

- store inner via _set_inner: real Modules stay registered submodules, None/
  lazy placeholders are kept as a plain attribute; __getattr__ resolves both
- clear errors when a compute step / attribute access hits an unloaded model
- bind_inner(model) to attach the real DiT once it materializes
- _LazyPatchDict binds the model transparently when the sampler assigns it
  into pipeline.models[key] (TRELLIS repos), so the cache survives lazy load
2026-07-24 03:01:31 +00:00
Krishi Attri ebe139e5f5 v0.2.0: GPU-validated inside ComfyUI; copy-on-patch cache safety; single-step reset fix
End-to-end validation on RTX 5090 (ComfyUI 0.24.0, Hunyuan3DWrapper master,
Hunyuan3D-2mini fp16, 30-step image-to-mesh workflow via the ComfyUI API):

- patch engages exactly on schedule (hermite i3: 11 computed + 19 skipped;
  dmd i5: 7 + 23), sampling 16.1 -> 43.1 it/s (2.68x) for hermite i3
- quality A/B same seed vs unaccelerated mesh: hermite i3 F1@0.05 0.825
  (different-seed floor 0.751); dmd i5 0.719, at the floor on mini, so the
  upstream DMD lossless claim is not repeated for this node
- repeat runs in one session reset per-run state correctly

Two bugs found by the validation, both fixed with regression tests:

1. ComfyUI cache aliasing: the node mutated and returned the same pipeline
   object, so a cached node output could silently run a different config
   after an intervening run re-patched the shared pipeline (observed live:
   a cached hermite-i3 output ran dmd-i5). apply/remove now return a
   shallow copy that owns its patch; the input pipeline is never mutated.
2. Run-boundary reset missed back-to-back single-step runs (t=0 then t=0);
   the boundary check is now non-increasing instead of strictly decreasing.

Defaults switch to the best-measured config (hermite, interval 3).
Tests 35 -> 38. README validation section rewritten from measurements;
REGISTRY-SUBMIT.md documents the registry.comfy.org publish flow.
2026-06-11 01:42:19 +00:00
Krishi Attri 26615c4bcf ComfyUI-HiCache v0.1.0 (beta): training-free Hunyuan3D acceleration node
One node, HiCacheAccelerate: patches the HY3DMODEL shape pipeline's DiT
(kijai/ComfyUI-Hunyuan3DWrapper) to skip DiT forwards and forecast the
flow-matching velocity via hicache-pp (HiCache Hermite / HiCache++ DMD /
auto holdout selection).

- zero comfy-internal imports: the patch targets the pipeline object the
  wrapper passes between nodes, so it covers hy3dgen (2.0), hy3dshape (2.1)
  and mini/turbo checkpoints alike
- 35 CPU unit tests: standalone node-pack load contract, schedule adherence
  on a mock DiT with the wrapper's exact loop shape, bit-identity with
  driving hicache-pp directly, DMD exactness on exponential trajectories,
  run-boundary reset, unpatch, parameter validation
- registry.comfy.org pyproject metadata (publish deferred until GPU-in-
  ComfyUI validation; repo ships as beta)
2026-06-10 04:22:18 +00:00