
    Z j                         S SK Jr  SSKJr  SSKJrJr  SSKJrJ	r	  \R                  " \5      r\" SS9\ " S	 S
\5      5       5       r\" SS9\ " S S\5      5       5       r\" SS9\ " S S\5      5       5       r/ SQrg)    )strict   )PreTrainedConfig)auto_docstringlogging   )CONFIG_MAPPING
AutoConfigzdeepseek-community/Janus-Pro-1B)
checkpointc                   n   \ rS rSr% SrSrSrSr\\	S'   Sr
\\	S'   S	r\\	S
'   Sr\\	S'   Sr\\\   -  \\\4   -  \	S'   S	r\\\   -  \\\4   -  \	S'   Sr\\	S'   Sr\\	S'   Sr\\-  \	S'   Sr\\-  \	S'   Sr\\	S'   Sr\\-  \	S'   Sr\\	S'   Sr\\-  \	S'   Sr\\	S'   S r\\	S!'   S"r\\	S#'   S$r\\	S%'   S&r g')(JanusVisionConfig   z
projection_dropout (`float`, *optional*, defaults to 0.0):
    Dropout probability for the projection layer.
num_image_tokens (`int`, *optional*, defaults to 576):
    Number of image tokens.
janus_vision_modelvision_configi   hidden_size   num_hidden_layers   num_attention_headsr   num_channelsi  
image_size
patch_sizegelu
hidden_actgư>layer_norm_eps        attention_dropoutg      @	mlp_ratioTattention_biashidden_dropout_rate   projection_dimprojection_dropoutFuse_qk_norm{Gz?initializer_ranger   depthi@  num_image_tokens N)!__name__
__module____qualname____firstlineno____doc__
model_typebase_config_keyr   int__annotations__r   r   r   r   listtupler   r   strr   floatr   r   r   boolr    r"   r#   r$   r&   r'   r(   __static_attributes__r)       ~/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/transformers/models/janus/configuration_janus.pyr   r      s    &J%OKs!!L#47Jd3i%S/1746Jd3i%S/16J NE %(us{( Ius{ ND'**NC&))K#u#E3Ncr9   r   c                      \ rS rSr% SrSrSrSr\\	S'   Sr
\\	S'   S	r\\	S
'   Sr\\	S'   Sr\\	S'   Sr\\	S'   Sr\\   \\S4   -  \	S'   Sr\\	S'   Sr\\-  \	S'   Sr\\	S'   Sr\\	S'   Sr\\	S'   Sr\\	S'   Sr\\	S'   S r\\	S!'   Sr\\	S"'   S#rg$)%JanusVQVAEConfig@   al  
base_channels (`int`, *optional*, defaults to 128):
    Base channel count.
channel_multiplier (`list[int]`, *optional*, defaults to `[1, 1, 2, 2, 4]`):
    Channel multipliers for each resolution.
num_res_blocks (`int`, *optional*, defaults to 2):
    Number of residual blocks.
num_patches (`int`, *optional*, defaults to 32):
    Num of patches the input images can be divided into.
out_channels (`int`, *optional*, defaults to 3):
    Number of out channels.
image_token_embed_dim (`int`, *optional*, defaults to 2048):
    Dimension of image embeddings. It should be same as the dimensionality of text embeddings.
janus_vqgan	vq_config   	embed_dimi @  num_embeddingsFdouble_latent   latent_channelsr   in_channels   base_channels)   rI   r   r      .channel_multiplierr   num_res_blocksr   dropoutr%   r&       num_patchesout_channelsr!   r"   r   r   r   image_token_embed_dimr)   N)r*   r+   r,   r-   r.   r/   r0   rA   r1   r2   rB   rC   r7   rE   rF   rH   rK   r3   r4   rL   rM   r6   r&   rO   rP   r"   r   r   r5   rQ   r8   r)   r9   r:   r<   r<   @   s     J!OIsNCM4OSKM36ES	E#s(O3ENCGUS[#u#KL#NCsJ!%3%r9   r<   c                      ^  \ rS rSr% SrSr\\\S.r	Sr
\\-  S-  \S'   Sr\\-  S-  \S'   Sr\\-  S-  \S'   S	r\\S
'   Sr\\S'   U 4S jrSrU =r$ )JanusConfigg   a  
Example:

```python
>>> from transformers import JanusForConditionalGeneration, JanusConfig, JanusVisionConfig, JanusVQVAEConfig, LlamaConfig

>>> # Initializing a Janus vision config
>>> vision_config = JanusVisionConfig()

>>> # Initializing a Llama config
>>> text_config = LlamaConfig()

>>> # Initializing a VQ config
>>> vq_config = JanusVQVAEConfig()

>>> # Initializing a Janus Pro 1B style configuration
>>> configuration = JanusConfig(vision_config=vision_config, text_config=text_config, vq_config=vq_config)

>>> # Initializing a model from the Janus Pro 1B style configuration
>>> model = JanusForConditionalGeneration(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```janus)text_configr   r?   NrV   r   r?   i image_token_idTtie_word_embeddingsc                   > [        U R                  [        5      (       aU  U R                  R                  SS5      U R                  S'   [        U R                  S      " S0 U R                  D6U l        O5U R                  c(  [
        R                  S5        [        S   " 5       U l        U R                  c%  [
        R                  S5        [        5       U l        O9[        U R                  [        5      (       a  [        S0 U R                  D6U l        U R                  c%  [
        R                  S5        [        5       U l	        O9[        U R                  [        5      (       a  [        S0 U R                  D6U l	        U R                  R                  U R                  R                  -  U R                  l        [        TU ]<  " S0 UD6  g )Nr/   llamaz7`text_config` is None. Initializing with default valueszK`vision_config` is None. Initializing with default JanusVisionConfig valueszF`vq_config` is None. Initializing with default JanusVQVAEConfig valuesr)   )
isinstancerV   dictgetr	   loggerinfor   r   r?   r<   r   r   rO   super__post_init__)selfkwargs	__class__s     r:   ra   JanusConfig.__post_init__   sW   d&&---1-=-=-A-A,PW-XD\*-d.>.>|.LMaPTP`P`aD%KKQR-g68D%KKef!2!4D**D11!2!HT5G5G!HD>>!KK`a-/DN---??DN &*%7%7%B%BdFXFXFcFc%c"''r9   )r*   r+   r,   r-   r.   r/   r
   r   r<   sub_configsrV   r\   r   r2   r   r?   rW   r1   rX   r7   ra   r8   __classcell__)rd   s   @r:   rS   rS   g   s    2 J!*%K 37K((4/648M4**T1804It&&-4 NC  $$( (r9   rS   )r<   r   rS   N)huggingface_hub.dataclassesr   configuration_utilsr   utilsr   r   autor	   r
   
get_loggerr*   r^   r   r<   rS   __all__r)   r9   r:   <module>rn      s   * / 3 , - 
		H	% <= (    > > <="&' "&  >"&J <==(" =(  >=(@ Cr9   