Update library/strategy_anima.py

Use torch.all instead of all.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Kohya S.
2026-02-11 22:28:00 +09:00
committed by GitHub
parent 59267d19f3
commit 82f963650b

View File

@@ -120,7 +120,7 @@ class AnimaTextEncodingStrategy(TextEncodingStrategy):
Replaces dropped items with pre-cached unconditional embeddings (from encoding "")
to match diffusion-pipe-main behavior.
"""
if caption_dropout_rates is None or all(caption_dropout_rates == 0.0):
if caption_dropout_rates is None or torch.all(caption_dropout_rates == 0.0).item():
return [prompt_embeds, attn_mask, t5_input_ids, t5_attn_mask]
# Clone to avoid in-place modification of cached tensors