Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python_coreml_stable_diffusion/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def _encode_prompt(self,
# tokenize without max_length to catch any truncation
untruncated_ids = tokenizer(prompt, padding="longest", return_tensors="np").input_ids

if untruncated_ids.shape[-1] >= text_input_ids.shape[-1] and not np.equal(
if untruncated_ids.shape[-1] >= text_input_ids.shape[-1] and not np.array_equal(
text_input_ids, untruncated_ids
):
removed_text = tokenizer.batch_decode(untruncated_ids[:, tokenizer.model_max_length - 1: -1])
Expand Down