images: stop attention slicing from silently killing every IP-Adapter load
Found by actually running it, not by reading it. Every IP-Adapter load was failing with SlicedAttnProcessor.__init__() missing 1 required positional argument: 'slice_size' and _ensure_ip_adapter_loaded() caught it, logged a warning and returned False — so character_profiles fell back to the prompt hint on the ONE path that was supposed to have real identity conditioning. The image came back looking plausible, which is why it was never noticed. Cause: we enable attention slicing for VRAM headroom, and diffusers' adapter loader rebuilds every attention processor; re-instantiating a SlicedAttnProcessor without its required slice_size raises. Slicing is now disabled for the load and left off while the adapter is in use (re-enabling would swap the IP-Adapter processors straight back out), and restored if the load fails anyway. Verified: the SlicedAttnProcessor error is gone. NOT yet working — the next blocker, now visible underneath: on a QUANTIZED pipeline the load fails with "Casting a quantized model to a new dtype is unsupported". So IP-Adapter still cannot attach to a 4-bit image model, and identity conditioning needs an unquantized image model (or a follow-up that loads the image encoder with an explicit dtype). Do not describe character identity as working end to end until that is resolved. Co-Authored-By:Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R6iugoNeEgt9PkajKrFyq4
Showing