SIGMitch commited on
Commit
1841c05
1 Parent(s): b557de9

if prompt_embeds is None:

Browse files
Files changed (1) hide show
  1. latent_consistency_img2img.py +2 -2
latent_consistency_img2img.py CHANGED
@@ -118,11 +118,11 @@ class LatentConsistencyModelImg2ImgPipeline(DiffusionPipeline):
118
  prompt,
119
  padding="max_length",
120
  max_length=self.tokenizer.model_max_length,
121
- truncation=False,
122
  return_tensors="pt",
123
  )
124
 
125
- text_input_ids = text_inputs.input_ids()
126
  untruncated_ids = self.tokenizer(
127
  prompt, padding="longest", return_tensors="pt"
128
  ).input_ids
 
118
  prompt,
119
  padding="max_length",
120
  max_length=self.tokenizer.model_max_length,
121
+ truncation=True,
122
  return_tensors="pt",
123
  )
124
 
125
+ text_input_ids = text_inputs.input_ids
126
  untruncated_ids = self.tokenizer(
127
  prompt, padding="longest", return_tensors="pt"
128
  ).input_ids