diff --git a/adv_encode.py b/adv_encode.py index 9e0cbb1..9f6d4d0 100644 --- a/adv_encode.py +++ b/adv_encode.py @@ -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)