o
    پi
                     @   sp   d dl mZmZ d dlmZ d dlmZmZ d dlm	Z	 d dl
mZ eG dd deZeG dd	 d	eZd
S )    )	dataclassfield)Any)
ArchConfigModelConfig)QuantizationConfig)AttentionBackendEnumc                   @   s   e Zd ZU eedZeed< eedZeed< eedZ	eed< eedZ
eed< eedZeed< edd dZee ed	< d
Zeed< d
Zeed< d
Zeed< eedZee ed< dZedB ed< dddZdS )DiTArchConfigdefault_factory_fsdp_shard_conditions_compile_conditionsparam_names_mappinglora_param_names_mappingreverse_param_names_mappingc                	   C   s(   t jt jt jt jt jt jt jt jt j	h	S N)
r   SLIDING_TILE_ATTN	SAGE_ATTNFAAITER
TORCH_SDPAVIDEO_SPARSE_ATTNSPARSE_VIDEO_GEN_2_ATTN
VMOBA_ATTNSAGE_ATTN_3 r   r   b/home/ubuntu/.local/lib/python3.10/site-packages/sglang/multimodal_gen/configs/models/dits/base.py<lambda>   s   zDiTArchConfig.<lambda>_supported_attention_backendsr   hidden_sizenum_attention_headsnum_channels_latentsexclude_lora_layersNboundary_ratioreturnc                 C   s   | j s| j | _ d S d S r   )r   r   copy)selfr   r   r   __post_init__.   s   zDiTArchConfig.__post_init__)r$   N)__name__
__module____qualname__r   listr   __annotations__r   dictr   r   r   r   setr   r   intr    r!   r"   strr#   floatr'   r   r   r   r   r	      s   
 r	   c                   @   sX   e Zd ZU eedZeed< dZeed< dZ	e
dB ed< eddeded	efd
dZdS )	DiTConfigr
   arch_config prefixNquant_config
dit-configparserr$   c                 C   sZ   | j d| dt|dd dtjdd | j d| dt|dd dd	d
d | S )z&Add CLI arguments for DiTConfig fieldsz--z.prefix-_zPrefix for the DiT model)typedestdefaulthelpz.quant-configz.quant_configNz,Quantization configuration for the DiT model)add_argumentr0   replacer2   r5   )r8   r5   r   r   r   add_cli_args;   s   

zDiTConfig.add_cli_args)r7   )r(   r)   r*   r   r	   r3   r,   r5   r0   r6   r   staticmethodr   rA   r   r   r   r   r2   3   s   
 r2   N)dataclassesr   r   typingr   )sglang.multimodal_gen.configs.models.baser   r   1sglang.multimodal_gen.runtime.layers.quantizationr   'sglang.multimodal_gen.runtime.platformsr   r	   r2   r   r   r   r   <module>   s   &