Skip to content

v0.2.1: SPADE Context Efficiency Fix

Choose a tag to compare

@danny-mio danny-mio released this 09 Dec 19:58
· 34 commits to main since this release
Immutable release. Only release title and notes can be modified.
dea9e0a

Fixed

SPADE context handling: Use None instead of torch.zeros_like(feat) when SPADE disabled

Benefits

  • More efficient - Avoids unnecessary tensor allocation
  • Semantically correct - None explicitly means "no context"
  • Already supported - ResidualUpsampleBlock checks context is not None

Changes

  • FluxExpander now passes ctx = None when use_context=False
  • Updated docstrings to document context=None usage
  • 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.1

Or upgrade:

pip install --upgrade fluxflow-core