Commit Graph
3 Commits
Author SHA1 Message Date
Krishi Attri fd2c6a5fda fix: support guard-then-load lazy pipelines 2026-07-25 00:34:10 +00:00
Krishi Attri 23a9f6b9cc 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:20 +00:00
Archerkattri 4917451e68 ComfyUI-TRELLIS2-HiCache v0.1.0: training-free HiCache acceleration for TRELLIS.2
Reuses the validated TRELLIS HiCache model-level forecast patch, adapted to
TRELLIS.2's five flow DiTs (sparse_structure + shape_slat 512/1024 + tex_slat
512/1024). GPU-validated on TRELLIS.2-4B/RTX 5090 (512 pipeline, interval=2):
1.9x at Chamfer 0.0107 (near-lossless). 8 standalone unit tests. Targets the
visualbruno/ComfyUI-Trellis2 TRELLIS2PIPELINE type.
2026-06-11 17:07:48 +00:00