
    +j$              	         S SK Jr  S SKJr  S SKJrJr   " S S5      r " S S5      r " S S	5      r	 " S
 S5      r
 " S S5      r " S S\\5      rS(S)S jjr\R                  / SQ\R                   / SQ\R"                  / SQ\R$                  / SQ0r " S S\\5      r/ SQr/ SQr " S S\5      r " S S\5      r " S S\5      r " S S \5      r " S! S"\5      r " S# S$\5      r " S% S&\5      rg')*    )annotations)Enum)	BaseModelFieldc                  $    \ rS rSrSS jrS rSrg)RecraftColor   c                    XU/U l         g Ncolor)selfrgbs       </home/wildlama/comfy/ComfyUI/comfy_api_nodes/apis/recraft.py__init__RecraftColor.__init__	   s    AY
    c                (    [        U R                  S9$ )N)rgb)RecraftColorObjectr   r   s    r   create_api_modelRecraftColor.create_api_model   s    !djj11r   r   N)r   intr   r   r   r   __name__
__module____qualname____firstlineno__r   r   __static_attributes__ r   r   r   r      s    2r   r   c                  @    \ rS rSrS rS rS
S jrS rS rSS jr	Sr
g	)RecraftColorChain   c                    / U l         g r   colorsr   s    r   r   RecraftColorChain.__init__   s	    *,r   c                T    [        U R                  5      S:  a  U R                  S   $ g )Nr   )lenr)   r   s    r   	get_firstRecraftColorChain.get_first   s$    t{{a;;q>!r   c                :    U R                   R                  U5        g r   )r)   append)r   r   s     r   addRecraftColorChain.add   s    5!r   c                    U R                   (       d  g U R                    Vs/ s H  oR                  5       PM     nnU$ s  snf r   )r)   r   )r   x
colors_apis      r   r   "RecraftColorChain.create_api_model   s7    {{48KK@Kq((*K
@ As   >c                b    [        5       nU R                   H  nUR                  U5        M     U$ r   )r%   r)   r1   )r   cr   s      r   cloneRecraftColorChain.clone"   s(    [[EEE%L !r   c                n    U R                  5       nUR                   H  nUR                  U5        M     U$ r   )r9   r)   r1   )r   otherr8   r   s       r   clone_and_merge!RecraftColorChain.clone_and_merge(   s+    JJL\\EEE%L "r   r(   N)r   r   )r<   r%   )r   r   r    r!   r   r-   r1   r   r9   r=   r"   r#   r   r   r%   r%      s     -
"r   r%   c                  2    \ rS rSr  S   SS jjrS rSrg)RecraftControls/   Nc                4    Xl         X l        X0l        X@l        g r   r)   background_colorartistic_levelno_text)r   r)   rD   rE   rF   s        r   r   RecraftControls.__init__0   s     0,r   c                   U R                   c(  U R                  c  U R                  c  U R                  c  g S nS nU R                   (       a  U R                   R	                  5       nU R                  (       a3  U R                  R                  5       nU(       a  UR	                  5       OS n[        XU R                  U R                  S9$ )NrC   )r)   rD   rE   rF   r   r-   RecraftControlsObject)r   r5   background_color_apifirst_backgrounds       r   r    RecraftControls.create_api_model7   s    ;;4#8#8#@TEXEXE`eieqeqey
#;;557J  #44>>@JZ#3#D#D#F`d $J<@<O<OY]YeYeg 	gr   )rE   rD   r)   rF   )NNNN)r)   r%   rD   r%   rE   r   rF   boolr   r#   r   r   r@   r@   /   s#    [_9=!$48gr   r@   c                  "    \ rS rSrSSS jjrSrg)RecraftStyleF   Nc                8    Xl         US:X  a  S nX l        X0l        g NNone)stylesubstylestyle_id)r   rT   rU   rV   s       r   r   RecraftStyle.__init__G   s    
vH  r   )rT   rV   rU   )NNN)rT   strrU   rX   rV   rX   )r   r   r    r!   r   r"   r#   r   r   rO   rO   F   s    ! !r   rO   c                       \ rS rSrSrSrSrSrg)	RecraftIOO   RECRAFT_V3_STYLERECRAFT_COLORRECRAFT_CONTROLSr#   N)r   r   r    r!   STYLEV3COLORCONTROLSr"   r#   r   r   rZ   rZ   O   s     GE!Hr   rZ   c                  $    \ rS rSrSrSrSrSrSrg)RecraftStyleV3U   realistic_imagedigital_illustrationvector_illustrationlogo_rasterr#   N)	r   r   r    r!   re   rf   rg   rh   r"   r#   r   r   rc   rc   U   s    'O1/Kr   rc   c                h    / nU(       a  UR                  S5        U[        R                  U / 5      -   $ rR   )r0   dict_recraft_substyles_v3get)style_v3include_none	substyless      r   get_v3_substylesro   ]   s1    I 044XrBBBr   )b_and_w
enterpriseevening_lightfaded_nostalgiaforest_life
hard_flashhdrmotion_blurmystic_naturalismnatural_lightnatural_tonesorganic_calmreal_life_glowretro_realismretro_snapshotstudio_portraiturban_dramavillage_realism	warm_folk))2d_art_poster2d_art_poster_2antiquarianbold_fantasy
child_bookchild_bookscover
crosshatchdigital_engravingengraving_colorexpressionismfreehand_detailsgraingrain_20graphic_intensity
hand_drawnhand_drawn_outlinehandmade_3dhard_comicsinfantile_sketchlong_shadowmodern_folk
multicolor	neon_calmnoirnostalgic_pasteloutline_detailspastel_gradientpastel_sketch	pixel_artplasticpop_artpop_renaissanceseamless
street_arttablet_sketch
urban_glowurban_sketchingvanilla_dreamsyoung_adult_bookyoung_adult_book_2)bold_stroke	chemistrycolored_stencilcontour_pop_artcosmicscutout
depressive	editorialemotional_flat	engravinginfographicalline_artline_circuitlinocutmarker_outlinemosaic	naivectorroundish_flatr   segmented_colorssharp_contrastthinvector_photovivid_shapes)emblem_graffitiemblem_pop_artemblem_punkemblem_stampemblem_vintagec                  P    \ rS rSrSrSrSrSrSrSr	Sr
S	rS
rSrSrSrSrSrSrSrg)RecraftImageSize   	1024x1024	1365x1024	1024x1365	1536x1024	1024x1536	1820x1024	1024x1820	1024x2048	2048x1024	1434x1024	1024x1434	1024x1280	1280x1024	1024x1707	1707x1024r#   N)r   r   r    r!   res_1024x1024res_1365x1024res_1024x1365res_1536x1024res_1024x1536res_1820x1024res_1024x1820res_1024x2048res_2048x1024res_1434x1024res_1024x1434res_1024x1280res_1280x1024res_1024x1707res_1707x1024r"   r#   r   r   r   r      sM    MMMMMMMMMMMMMMMr   r   )r   1536x768768x15361280x832832x12801216x896896x12161152x896896x1152832x13441280x896896x12801344x768768x1344)	2048x2048	3072x1536	1536x3072	2560x1664	1664x2560	2432x1792	1792x2432	2304x1792	1792x2304	1664x2688r   r   	2560x1792	1792x2560c                  .    \ rS rSr% \" SSS9rS\S'   Srg)	r      .zIAn array of 3 integer values in range of 0...255 defining RGB Color Modeldescriptionz	list[int]r   r#   N)r   r   r    r!   r   r   __annotations__r"   r#   r   r   r   r      s    3,wxCxr   r   c                  v    \ rS rSr% \" SSS9rS\S'   \" SSS9rS\S	'   \" SS
S9rS\S'   \" SSS9r	S\S'   Sr
g)rI   i  NzAn array of preferable colorsr  zlist[RecraftColorObject] | Noner)   z-Use given color as a desired background colorzRecraftColorObject | NonerD   zDo not embed text layoutszbool | NonerF   zDefines artistic tone of your image. At a simple level, the person looks straight at the camera in a static and clean style. Dynamic and eccentric levels introduce movement and creativity. The value should be in range [0..5].
int | NonerE   r#   )r   r   r    r!   r   r)   r  rD   rF   rE   r"   r#   r   r   rI   rI     sV    .3DFe.fF+f27Jy2z/z 3NOG[O!&t  :]  "^NJ  ^r   rI   c                      \ rS rSr% \" SSS9rS\S'   \" SSS9rS	\S
'   \" SSS9rS\S'   \" SSS9r	S	\S'   \" S5      r
S\S'   \" SSS9rS	\S'   \" SSS9rS	\S'   \" SSS9rS\S'   \" SSS9rS	\S'   \" SSS9rS\S'   \" SSS9rS\S'   S rg)!RecraftImageGenerationRequesti	  .z0The text prompt describing the image to generater  rX   promptNz3The size of the generated image (e.g., "1024x1024")z
str | Nonesizez The number of images to generater   nz4A text description of undesired elements on an imagenegative_promptmodelzHThe style to apply to the generated image (e.g., "digital_illustration")rT   zJThe substyle to apply to the generated image, depending on the style inputrU   z6A set of custom parameters to tweak generation processzRecraftControlsObject | Nonecontrolsz4Use a previously uploaded style as a reference; UUIDrV   zDefines the difference with the original image, should lie in [0, 1], where 0 means almost identical, and 1 means miserable similarityzfloat | NonestrengthzSeed for video generationr  random_seedr#   )r   r   r    r!   r   r  r  r  r  r  r  rT   rU   r  rV   r  r  r"   r#   r   r   r
  r
  	  s    )[\FC\T/deD*e3$FGAsG"':p"qOZqsE3d0z{E:{ 3  AHj  A-24E}-~H*~ 3ijHjj"4  6~  Hl  #D6QRKRr   r
  c                  F    \ rS rSr% \" SSS9rS\S'   \" SSS9rS\S'   S	rg
)RecraftReturnedObjecti  .z)Unique identifier for the generated imager  rX   image_idz!URL to access the generated imageurlr#   N)	r   r   r    r!   r   r  r  r  r"   r#   r   r   r  r    s&    #+VWHcWS&IJCJr   r  c                  v    \ rS rSr% \" SSS9rS\S'   \" SSS9rS\S'   \" S	S
S9rS\S'   \" S	SS9r	S\S'   Sr
g	)RecraftImageGenerationResponsei  .z.Unix timestamp when the generation was createdr  r   createdz)Number of credits used for the generationcreditsNz$Array of generated image informationz"list[RecraftReturnedObject] | NonedatazSingle generated imagezRecraftReturnedObject | Noneimager#   )r   r   r    r!   r   r  r  r  r  r  r"   r#   r   r   r  r    sL    *Z[GS[*UVGSV/4TGm/nD
,n*/BZ*[E'[r   r  c                  .    \ rS rSr% \" SSS9rS\S'   Srg)	RecraftCreateStyleRequesti#  .zCrealistic_image, digital_illustration, vector_illustration, or iconr  rX   rT   r#   N)r   r   r    r!   r   rT   r  r"   r#   r   r   r  r  #  s    s(mnE3nr   r  c                  .    \ rS rSr% \" SSS9rS\S'   Srg)	RecraftCreateStyleResponsei'  .zUUID of the created styler  rX   idr#   N)r   r   r    r!   r   r!  r  r"   r#   r   r   r   r   '  s    C%@ABAr   r   N)T)rl   rX   returnz	list[str])
__future__r   enumr   pydanticr   r   r   r%   r@   rO   rZ   rX   rc   ro   re   rf   rg   rh   rj   r   RECRAFT_V4_SIZESRECRAFT_V4_PRO_SIZESr   rI   r
  r  r  r  r   r#   r   r   <module>r(     s"   "  %2 2 >g g.! !" " S$  C "" %* '' **V && )4  !wb J sD  $ " $y y^I ^SI SKI K
\Y \o	 oB Br   