mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
Fix Cascade overcooking with more than 75 tokens
This commit is contained in:
@@ -230,6 +230,7 @@ def pad_to_same_length(pipe, embeds):
|
||||
try:
|
||||
if getattr(pipe, "prior_pipe", None) and getattr(pipe.prior_pipe, "text_encoder", None) is not None: # Cascade
|
||||
empty_embed = pipe.prior_pipe.encode_prompt(device, 1, 1, False, "")
|
||||
empty_embed = [torch.zeros(empty_embed[0].shape, device=empty_embed[0].device, dtype=empty_embed[0].dtype)]
|
||||
else: # SDXL
|
||||
empty_embed = pipe.encode_prompt("")
|
||||
except TypeError: # SD1.5
|
||||
|
||||
Reference in New Issue
Block a user