@@ -35,6 +35,8 @@ def load_torch_file_with_dict(*args, **kwargs):
35
35
return load_torch_file_with_dict
36
36
37
37
38
+ CURRENT_WRAPPER_VERSION = 10002
39
+
38
40
class WrapperConsts :
39
41
ACN = "ACN"
40
42
VERSION = "version"
@@ -480,6 +482,8 @@ class WeightTypeException(TypeError):
480
482
481
483
482
484
class AdvancedControlBase :
485
+ ACN_VERSION = CURRENT_WRAPPER_VERSION
486
+
483
487
def __init__ (self , base : ControlBase , timestep_keyframes : TimestepKeyframeGroup , weights_default : ControlWeights , require_vae = False , allow_condhint_latents = False ):
484
488
self .base = base
485
489
self .compatible_weights = [ControlWeightType .UNIVERSAL , ControlWeightType .DEFAULT ]
@@ -679,6 +683,11 @@ def get_control_inject(self, x_noisy, t, cond, batched_number, transformer_optio
679
683
self .batched_number = batched_number
680
684
self .batch_size = len (t )
681
685
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" ]
682
691
# prepare timestep and everything related
683
692
self .prepare_current_timestep (t = t , transformer_options = transformer_options )
684
693
# if should not perform any actions for the controlnet, exit without doing any work
0 commit comments