Update bnk_adv_encode.py

This commit is contained in:
VALADI K JAGANATHAN
2024-02-27 07:16:44 +05:30
committed by GitHub
parent 1f02149480
commit f6d01dc544

View File

@@ -223,7 +223,7 @@ def encode_token_weights_l(model, token_weight_pairs):
def encode_token_weights(model, token_weight_pairs, encode_func):
if model.layer_idx is not None:
model.cond_stage_model.clip_layer(model.layer_idx)
model.cond_stage_model.set_clip_options({"layer": model.layer_idx})
model_management.load_model_gpu(model.patcher)
return encode_func(model.cond_stage_model, token_weight_pairs)