Menyu commited on
Commit
f3ac996
1 Parent(s): b5902d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -45,8 +45,8 @@ def infer(
45
  ):
46
  seed = int(randomize_seed_fn(seed, randomize_seed))
47
  generator = torch.Generator().manual_seed(seed)
48
- compel = Compel(tokenizer=pipe.tokenizer, text_encoder=pipe.text_encoder)
49
- conditioning, pooled = compel.build_conditioning_tensor(prompt)
50
 
51
  image = pipe(
52
  #prompt=prompt,
 
45
  ):
46
  seed = int(randomize_seed_fn(seed, randomize_seed))
47
  generator = torch.Generator().manual_seed(seed)
48
+ compel = Compel(tokenizer=[pipe.tokenizer, pipe.tokenizer_2] , text_encoder=[pipe.text_encoder, pipe.text_encoder_2], returned_embeddings_type=ReturnedEmbeddingsType.PENULTIMATE_HIDDEN_STATES_NON_NORMALIZED, requires_pooled=[False, True])
49
+ conditioning, pooled = compel(prompt)
50
 
51
  image = pipe(
52
  #prompt=prompt,