o
    Û·it  ã                   @   s   d Z ddlZG dd„ dƒZdS )zj
TeaCache state management.

This module manages the state for TeaCache hooks across diffusion timesteps.
é    Nc                   @   s"   e Zd ZdZdd„ Zddd„ZdS )	ÚTeaCacheStatezÂ
    State management for TeaCache hook.

    Tracks caching state across diffusion timesteps, managing counters,
    accumulated distances, and cached residuals for the TeaCache algorithm.
    c                 C   ó"   d| _ d| _d| _d| _d| _dS )z Initialize empty TeaCache state.r   ç        N©ÚcntÚaccumulated_rel_l1_distanceÚprevious_modulated_inputÚprevious_residualÚprevious_residual_encoder©Úself© r   ú^/home/ubuntu/vllm_env/lib/python3.10/site-packages/vllm_omni/diffusion/cache/teacache/state.pyÚ__init__   s
   
zTeaCacheState.__init__ÚreturnNc                 C   r   )z2Reset all state variables for a new inference run.r   r   Nr   r   r   r   r   Úreset    s
   
zTeaCacheState.reset)r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r      s    r   )r   Útorchr   r   r   r   r   Ú<module>   s   