""" Anima native executor for SGLang Diffusion ComfyUI integration. Extends NativeExecutor to add preprocess_text_embeds support required by model_base.Anima.extra_conds(). """ from .native import NativeExecutor class AnimaExecutor(NativeExecutor): """Native executor for Anima models. Extends NativeExecutor to expose preprocess_text_embeds, which model_base.Anima.extra_conds() calls before the forward pass. """ def __init__(self, generator, model_path, model, config, native_diffusion_model): super().__init__(generator, model_path, model, config, native_diffusion_model) # Expose preprocess_text_embeds so model_base.Anima.extra_conds() can call it self.preprocess_text_embeds = native_diffusion_model.preprocess_text_embeds def forward(self, x, timesteps, context, **kwargs): """Forward pass: delegate directly to the ComfyUI Anima model.""" return self.native_diffusion_model(x, timesteps, context, **kwargs)