@@ -35,6 +35,8 @@ def load_torch_file_with_dict(*args, **kwargs):
3535 return load_torch_file_with_dict
3636
3737
38+ CURRENT_WRAPPER_VERSION = 10002
39+
3840class WrapperConsts :
3941 ACN = "ACN"
4042 VERSION = "version"
@@ -480,6 +482,8 @@ class WeightTypeException(TypeError):
480482
481483
482484class AdvancedControlBase :
485+ ACN_VERSION = CURRENT_WRAPPER_VERSION
486+
483487 def __init__ (self , base : ControlBase , timestep_keyframes : TimestepKeyframeGroup , weights_default : ControlWeights , require_vae = False , allow_condhint_latents = False ):
484488 self .base = base
485489 self .compatible_weights = [ControlWeightType .UNIVERSAL , ControlWeightType .DEFAULT ]
@@ -679,6 +683,11 @@ def get_control_inject(self, x_noisy, t, cond, batched_number, transformer_optio
679683 self .batched_number = batched_number
680684 self .batch_size = len (t )
681685 self .cond_or_uncond = transformer_options .get ("cond_or_uncond" , None )
686+ # fill out ad_param-related fields, if present
687+ if "ad_params" in transformer_options :
688+ self .sub_idxs = transformer_options ["ad_params" ]["sub_idxs" ]
689+ self .full_latent_length = transformer_options ["ad_params" ]["full_length" ]
690+ self .context_length = transformer_options ["ad_params" ]["context_length" ]
682691 # prepare timestep and everything related
683692 self .prepare_current_timestep (t = t , transformer_options = transformer_options )
684693 # if should not perform any actions for the controlnet, exit without doing any work
0 commit comments