v0.2.1: SPADE Context Efficiency Fix
·
34 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Fixed
SPADE context handling: Use None instead of torch.zeros_like(feat) when SPADE disabled
Benefits
- ✅ More efficient - Avoids unnecessary tensor allocation
- ✅ Semantically correct -
Noneexplicitly means "no context" - ✅ Already supported -
ResidualUpsampleBlockcheckscontext is not None
Changes
FluxExpandernow passesctx = Nonewhenuse_context=False- Updated docstrings to document
context=Noneusage - Added 6 unit tests in
tests/unit/test_expander_context.py
Testing
- All existing tests pass
- 6 new unit tests verify correct behavior
- Linters clean (black, flake8, mypy)
- Gradient flow verified with
use_context=False
Installation
pip install fluxflow-core==0.2.1Or upgrade:
pip install --upgrade fluxflow-core