mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-15 00:32:25 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user