sayakpaul HF staff commited on
Commit
be95033
1 Parent(s): d513c3c

fix: textual inversion conditioning.

Browse files
Files changed (1) hide show
  1. convert.py +1 -1
convert.py CHANGED
@@ -54,7 +54,7 @@ def initialize_tf_models(
54
  img_height=IMG_HEIGHT, img_width=IMG_WIDTH
55
  )
56
 
57
- if text_encoder_weights is None:
58
  tf_text_encoder = tf_sd_model.text_encoder
59
  else:
60
  tf_text_encoder = keras_cv.models.stable_diffusion.TextEncoder(
 
54
  img_height=IMG_HEIGHT, img_width=IMG_WIDTH
55
  )
56
 
57
+ if text_encoder_weights is None or placeholder_token is not None:
58
  tf_text_encoder = tf_sd_model.text_encoder
59
  else:
60
  tf_text_encoder = keras_cv.models.stable_diffusion.TextEncoder(