Setter-backed WeightHooks fail and can cache incomplete groups
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
## Problem
Krea2 FP8 and INT8 WeightHooks call:
```python
set_weight(..., inplace_update=True)
```
Mixed-precision setters must return a complete replacement containing storage
and quantization metadata, so the current call asserts before sampling.
After that path is enabled, `MaxSpeed` can also cache a large HookGroup one
weight at a time, leaving a partial GPU cache and an unbounded CPU fallback.
## Reproduction
Load a Krea2 FP8 or INT8 checkpoint, attach a model LoRA with
`CreateHookLoraModelOnly -> SetClipHooks`, and run `KSampler`.
## Expected behavior
- Setter-backed Hooks use complete replacement semantics for apply and restore.
- A HookGroup cache is published only when the complete group fits.
- A group that does not fit remains correct without a partial cache.
Local FP8/INT8 unit tests and real image-generation tests cover both contracts.
The earlier synthetic-key failure remains tracked by #14382 / #14413.
Contributor guide
Research direction
Start at the setter-backed WeightHooks path used by CreateHookLoraModelOnly -> SetClipHooks and KSampler, then inspect set_weight(..., inplace_update=True), MaxSpeed, and HookGroup caching. Reproduce with a Krea2 FP8 or INT8 checkpoint and run the local FP8/INT8 unit tests. Done means apply and restore use complete replacements and oversized groups do not publish partial caches or an unbounded CPU fallback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100