mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
Submodule extensions-builtin/sdnext-modernui updated: 895addec9e...257be050af
@@ -167,13 +167,14 @@ class PromptEmbedder:
|
||||
pipe = prepare_model()
|
||||
|
||||
def __call__(self, key, step=0):
|
||||
batch = getattr(self, key)
|
||||
batch = getattr(self, key) # for batch-size=1, len(batch)==1
|
||||
res = []
|
||||
for i in range(self.batchsize):
|
||||
if len(batch[i]) == 0:
|
||||
if len(batch[i]) == 0: # if not using prompt-scheduling, this will be len(batch[i])==1
|
||||
return None
|
||||
else:
|
||||
res.append(batch[i][step])
|
||||
# causes error in callback
|
||||
res.append(batch[i][step]) # and this requests element for specific step when called from callback - but self.scheduled_prompt==False so len(batch[i])==1 and step is list index out-of-bounds!
|
||||
if step != 0: # For Callback
|
||||
res.append(batch[i][step]) # Diffusers internally doubles batch dimension
|
||||
return torch.cat(res)
|
||||
|
||||
+1
-1
Submodule wiki updated: 2dba58a696...47ea50e915
Reference in New Issue
Block a user