+
    ik                     x   R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHtH	t	H
t
Ht ^ RIHt ^ RIt^ RIHt ^ RIHt ^ RIHt ]P*                  ! ]4      tRtRt^2tR	t^tR
tRtRtRRRRRR/t ]!! ] PE                  4       4      t#Rt$^t%Rt&Rt'Rt(Rt)Rt*^t+^t,. RrOt-RR
.t.. RsOt/]! RRR7      t0Rs1Rs2]Pf                  ! 4       t4R t5R R lt6 ! R R4      t7R  t8R! R" lt9RtR# R$ llt:R% R& lt;]]]]]R3R' R( llt<R) R* lt=R+ R, lt>R- R. lt?]R/8X  Ed    ]@! R04       ]@! Ru4       ]=! 4       tA]A'       g"   ]@! R14       ]@! R24       ]@! R34       ]B! ^4       M]@! R44        ^ RIt]@! R54       ]@! R84       ]@! R9] 24       ]@! R:]$ R;]% R<24       ]0P                  '       d-   ]@! R=]0P                   24       ]@! R>]0P                   R?24       M]@! R@4       ]@! RA4       ]@! RB4       ]@! RC4       ]@! RD4       ]@! RE4       ]@! RF4       ]@! RG4       ]@! RH4       ]@! RI4       ]@! RJ4       ]@! RK4       ]@! RL4       ]@! RM4       ]@! RN4       ]- F  tF]@! RO]F 24       K  	  ]@! RP4       ]@! RQ4       ]/ F  tG]@! RO]G 24       K  	  ]@! RR4       ]@! RS4       ]@! RT4       ]@! RU4       ]@! RV4       ]@! RW4       ]@! RX4       ]@! RY4       ]@! RZ4       ]@! R[4       ]@! R\4       ^ R]IHHItI R^R_R`RaRbRcRdReRfRcRgR`Rh/RiRcRgRj. RvOR`RkRlR//RmRf.//tJRn tK]IP                  ! R_Ro]J]K]>. RRpRq7       R#   ]C d    ]@! R64       ]@! R74       ]B! ^4        ELi ; i)wa  
Image Generation Tools Module

This module provides image generation tools using FAL.ai's FLUX 2 Pro model with 
automatic upscaling via FAL.ai's Clarity Upscaler for enhanced image quality.

Available tools:
- image_generate_tool: Generate images from text prompts with automatic upscaling

Features:
- High-quality image generation using FLUX 2 Pro model
- Automatic 2x upscaling using Clarity Upscaler for enhanced quality
- Comprehensive parameter control (size, steps, guidance, etc.)
- Proper error handling and validation with fallback to original images
- Debug logging support
- Sync mode for immediate results

Usage:
    from image_generation_tool import image_generate_tool
    import asyncio
    
    # Generate and automatically upscale an image
    result = await image_generate_tool(
        prompt="A serene mountain landscape with cherry blossoms",
        image_size="landscape_4_3",
        num_images=1
    )
N)DictAnyOptionalUnion)	urlencode)DebugSession)resolve_managed_tool_gateway)managed_nous_tools_enabledzfal-ai/flux-2-pro	landscape      @pngF5landscape_16_9square	square_hdportraitportrait_16_9zfal-ai/clarity-upscalerz"masterpiece, best quality, highresz.(worst quality, low quality, normal quality:2)gffffff?g333333?jpegimage_toolsIMAGE_TOOLS_DEBUG)env_varc                 T    \         P                  ! R4      '       d   R# \        R4      # )zOReturn managed fal-queue gateway config when direct FAL credentials are absent.FAL_KEYNz	fal-queue)osgetenvr        8/home/ubuntu/hermes-agent/tools/image_generation_tool.py_resolve_managed_fal_gatewayr   Z   s    	yy'44r   c                0    V ^8  d   QhR\         R\         /# )   queue_run_originreturnstr)formats   "r   __annotate__r&   a   s     # #c #c #r   c                     \        T ;'       g    R 4      P                  4       P                  R4      pV'       g   \        R4      hV R2# ) /z$Managed FAL queue origin is required)r$   striprstrip
ValueError)r!   normalized_origins   & r   _normalize_fal_queue_url_formatr.   a   sG    ,22399;BB3G?@@ ""r   c                   d   a  ] tR t^ht o RtV 3R lR ltRRRRRRR	RR
RRR/V 3R lR lltRtV tR# )_ManagedFalSyncClientzPSmall per-instance wrapper around fal_client.SyncClient for managed queue hosts.c                &   < V ^8  d   QhRS[ RS[ /# )r    keyr!   r#   )r%   __classdict__s   "r   r&   "_ManagedFalSyncClient.__annotate__k   s     o os oc or   c                  \        \        R R4      pVf   \        R4      h\        \        RR4      pVf   \        R4      h\        V4      V n        V! VR7      V n        \        V P
                  RR4      V n        \        VRR4      V n        \        VRR4      V n        \        VR	R4      V n	        \        VR
R4      V n
        \        VRR4      V n        \        VRR4      V n        V P                  f   \        R4      hV P                  e   V P                  f   \        R4      hV P                  f   \        R4      hR# )
SyncClientNz>fal_client.SyncClient is required for managed FAL gateway modeclientz:fal_client.client is required for managed FAL gateway mode)r2   _client_maybe_retry_request_raise_for_statusSyncRequestHandleadd_hint_headeradd_priority_headeradd_timeout_headerzFfal_client.SyncClient._client is required for managed FAL gateway modezKfal_client.client request helpers are required for managed FAL gateway modezLfal_client.client.SyncRequestHandle is required for managed FAL gateway mode)getattr
fal_clientRuntimeErrorr.   _queue_url_format_sync_client_http_clientr9   r:   _request_handle_class_add_hint_header_add_priority_header_add_timeout_header)selfr2   r!   sync_client_classclient_modules   &$$  r   __init___ManagedFalSyncClient.__init__k   s=   #JdC$_``
Hd; [\\!@AQ!R-#6#D$5$5y$G$+M;QSW$X!!(8KT!R%,]<OQU%V" '7H$ O$+M;PRV$W!#*=:NPT#U $ghh$$,0F0F0Nlmm%%-mnn .r   pathr(   hintNwebhook_urlpriorityheadersstart_timeoutc                   < V ^8  d   QhRS[ RS[S[ S[3,          RS[ RS[S[ ,          RS[S[ ,          RS[RS[S[S[ S[ 3,          ,          RS[S[S[S[3,          ,          /# )	r    application	argumentsrN   rO   rP   rQ   rR   rS   )r$   r   r   r   r   intfloat)r%   r3   s   "r   r&   r4      s     /
 /
/
 S>/

 /
 sm/
 c]/
 /
 $sCx.)/
  c5j 12/
r   c                  V P                   V,           p	V'       d    V	R VP                  R 4      ,           ,          p	Ve   V	R\        RV/4      ,           ,          p	\        T;'       g    / 4      p
Ve    V P                  e   V P	                  WJ4       Ve+   V P
                  f   \        R4      hV P                  Wj4       Ve+   V P                  f   \        R4      hV P                  W4       V P                  V P                  RV	V\        V P                  RR4      V
R7      pV P                  V4       VP                  4       pV P                  VR	,          VR
,          VR,          VR,          V P                  R7      # )r)   ?fal_webhookzGfal_client.client.add_priority_header is required for priority requestszEfal_client.client.add_timeout_header is required for timeout requestsPOSTdefault_timeoutg      ^@)jsontimeoutrR   
request_idresponse_url
status_url
cancel_url)r`   ra   rb   rc   r7   )rB   lstripr   dictrF   rG   rA   rH   r9   rD   r?   rC   r:   r^   rE   )rI   rU   rV   rN   rO   rP   rQ   rR   rS   urlrequest_headersresponsedatas   &&&$$$$$$    r   submit_ManagedFalSyncClient.submit   sn    $${23S)))C"3M;#?@@@Cw}}"- 5 5 A!!$8((0"#lmm%%h@$''/"#jkk$$]D,,D--/@%H# - 
 	x(}}))L)n-L)L)$$ * 
 	
r   )	rF   rG   rH   rD   r9   rB   r:   rE   rC   )	__name__
__module____qualname____firstlineno____doc__rL   rj   __static_attributes____classdictcell__)r3   s   @r   r0   r0   h   s_     Zo o4/

 /
 #/
 &*/
 /
 -1/
 6:/
 /
 /
r   r0   c                B   V P                   P                  R4      V P                  3p\        ;_uu_ 4        \        e   \
        V8X  d   \        uuRRR4       # \        V P                  V P                   R7      sVs\        uuRRR4       #   + '       g   i     R# ; i)zQReuse the managed FAL client so its internal httpx.Client is not leaked per call.r)   N)r2   r!   )gateway_originr+   nous_user_token_managed_fal_client_lock_managed_fal_client_managed_fal_client_configr0   )managed_gatewayclient_configs   & r   _get_managed_fal_clientr{      s    
 	&&--c2''M 
"	!*/I]/Z& 
"	! 4//,;;
 &3"" 
"	!	!	!s   B(BB	c                R    V ^8  d   QhR\         R\        \         \        3,          /# )r    modelrV   r$   r   r   )r%   s   "r   r&   r&      s"      s tCH~ r   c                    R\        \        P                  ! 4       4      /p\        4       pVf   \        P
                  ! WVR7      # \        V4      pVP                  V VVR7      # )zKSubmit a FAL request using direct credentials or the managed queue gateway.zx-idempotency-key)rV   rR   )r$   uuiduuid4r   r@   rj   r{   )r}   rV   rg   ry   managed_clients   &&   r   _submit_fal_requestr      sc    *C

,=>O24O  _UU,_=N   !  r   c                    V ^8  d   QhR\         \        \        \        \        3,          3,          R\        R\        R\        R\        R\        R\        \        \
        3,          /# )r    
image_sizenum_inference_stepsguidance_scale
num_imagesoutput_formataccelerationr"   )r   r$   r   rW   rX   r   )r%   s   "r   r&   r&      sq     F Fc4S>)*FF F 	F
 F F 
#s(^Fr   c                   / p\        V \        4      '       d&   V \        9  d   \        RV  R\         24      hWR&   M\        V \        4      '       d   RV 9  g   RV 9  d   \        R4      h\        V R,          \
        4      '       d   \        V R,          \
        4      '       g   \        R4      hV R,          ^@8  g   V R,          ^@8  d   \        R4      hV R,          R	8  g   V R,          R	8  d   \        R
4      hWR&   M\        R4      h\        V\
        4      '       d   V^8  g   V^d8  d   \        R4      hWR&   \        V\
        \        34      '       d   VR8  g   VR8  d   \        R4      h\        V4      VR&   \        V\
        4      '       d   V^8  g   V^8  d   \        R4      hW6R&   V\        9  d   \        RV R\         24      hWFR&   V\        9  d   \        RV R\         24      hWVR&   V# )a  
Validate and normalize image generation parameters for FLUX 2 Pro model.

Args:
    image_size: Either a preset string or custom size dict
    num_inference_steps: Number of inference steps
    guidance_scale: Guidance scale value
    num_images: Number of images to generate
    output_format: Output format for images
    acceleration: Acceleration mode for generation speed

Returns:
    Dict[str, Any]: Validated and normalized parameters

Raises:
    ValueError: If any parameter is invalid
zInvalid image_size 'z'. Must be one of: r   widthheightz8Custom image_size must contain 'width' and 'height' keysz3Custom image_size width and height must be integersz3Custom image_size dimensions must be at least 64x64i   z6Custom image_size dimensions must not exceed 2048x2048zEimage_size must be either a preset string or a dict with width/heightz8num_inference_steps must be an integer between 1 and 100r   g?g      4@z4guidance_scale must be a number between 0.1 and 20.0r   z-num_images must be an integer between 1 and 4r   zInvalid output_format 'r   zInvalid acceleration 'r   )	
isinstancer$   VALID_IMAGE_SIZESr,   re   rW   rX   VALID_OUTPUT_FORMATSVALID_ACCELERATION_MODES)r   r   r   r   r   r   	validateds   &&&&&& r   _validate_parametersr      s   2 I *c""..3J<?RSdRefgg",,	J	%	%*$
(BWXX*W-s33:jQYFZ\_;`;`RSSg#z(';b'@RSSg%H)=)DUVV",,`aa )3//3F3JNadgNgSTT':#$ nsEl33~7K~`dOdOPP"'"7I j#&&*q.JNHII(l 002=/ATUiTjkll!.o 331,?RSkRlmnn ,nr   c                ^    V ^8  d   QhR\         R\         R\        \         \        3,          /# )r    	image_urloriginal_promptr"   r~   )r%   s   "r   r&   r&   #  s)     : :c :C :DcN :r   c                ~    \         P                  R4       RV R\         RV 2R\        R\        R\
        R\        R	\        R
\        R\        /	p\        \        VR7      pVP                  4       pV'       d   RV9   dx   VR,          p\         P                  RVP                  RR4      VP                  RR4      4       RVR,          RVP                  R^ 4      RVP                  R^ 4      RRR\        /# \         P                  R4       R#   \         d$   p\         P                  RTRR7        Rp?R# Rp?ii ; i)a  
Upscale an image using FAL.ai's Clarity Upscaler.

Uses the synchronous fal_client API to avoid event loop lifecycle issues
when called from threaded contexts (e.g. gateway thread pool).

Args:
    image_url (str): URL of the image to upscale
    original_prompt (str): Original prompt used to generate the image

Returns:
    Dict[str, Any]: Upscaled image data or None if upscaling fails
z(Upscaling image with Clarity Upscaler...r   promptz, upscale_factornegative_prompt
creativityresemblancer   r   enable_safety_checkerrV   imagez$Image upscaled successfully to %sx%sr   unknownr   rf   upscaledTz"Upscaler returned invalid responseNzError upscaling image: %sexc_info)loggerinfoUPSCALER_DEFAULT_PROMPTUPSCALER_FACTORUPSCALER_NEGATIVE_PROMPTUPSCALER_CREATIVITYUPSCALER_RESEMBLANCEUPSCALER_GUIDANCE_SCALEUPSCALER_NUM_INFERENCE_STEPSUPSCALER_SAFETY_CHECKERr   UPSCALER_MODELgeterror	Exception)r   r   upscaler_argumentshandlerresultupscaled_imagees   &&     r   _upscale_imager   #  sJ   ,>? 01O3DEo7-/5!#?#%<

  &(
 g'#G_NKK>@R@RSZ\e@fhvhzhz  |D  FO  iP  Q~e,++GQ7.,,Xq9D /  LL=> 0!dCs   C4D 7D D<D77D<c                    V ^8  d   QhR\         R\         R\        R\        R\        R\         R\        \        ,          R\         /# )	r    r   aspect_ratior   r   r   r   seedr"   )r$   rW   rX   r   )r%   s   "r   r&   r&   `  sp     vG vGvGvG vG 	vG
 vG vG 3-vG 	vGr   c                
   V'       d   VP                  4       P                  4       M\        pV\        9  d"   \        P                  RV\        4       \        p\        V,          pRRV RVRVRVRVRVR	VR
V/RRRRR^ R^ /p	\        P                  P                  4       p
 \        P                  RW@R,          4       V '       d5   \        V \        4      '       d   \        V P                  4       4      ^ 8X  d   \        R4      h\        P                  ! R4      '       g7   \        4       '       g'   Rp\!        4       '       d
   VR,          p\        V4      h\#        WW4VR4      pRV P                  4       RVR,          RVR,          RVR,          RVR,          R	VR	,          R\$        R\&        RR/	pVe   \        V\(        4      '       d   WmR
&   \        P                  R4       \        P                  R\*        4       \        P                  RWx4       \        P                  RVR,          4       \        P                  R VR,          4       \-        \*        VR!7      pVP/                  4       p\        P                  P                  4       V
,
          P1                  4       pV'       d   R"V9  d   \        R#4      hVP/                  R". 4      pV'       g   \        R$4      h. pV F  p\        V\2        4      '       g   K  R%V9   g   K$  R%VR%,          R&VP/                  R&^ 4      R'VP/                  R'^ 4      /p\5        VR%,          V P                  4       4      pV'       d   VP7                  V4       K  \        P                  R(4       RVR)&   VP7                  V4       K  	  V'       g   \        R*4      h\9        R+ V 4       4      p\        P                  R,\        V4      VV4       RRR-V'       d   V^ ,          R%,          MR/pRV	R&   \        V4      V	R&   VV	R&   \:        P=                  R.V	4       \:        P?                  4        \@        PB                  ! V^RR/7      #   \D         d   p\        P                  P                  4       T
,
          P1                  4       pR0\        T4       2p\        PG                  R1TRR27       RRR-RR\        T4      R3\I        T4      PJ                  /pTT	R&   TT	R&   \:        P=                  R.T	4       \:        P?                  4        \@        PB                  ! T^RR/7      u Rp?# Rp?ii ; i)4a_  
Generate images from text prompts using FAL.ai's FLUX 2 Pro model with automatic upscaling.

Uses the synchronous fal_client API to avoid event loop lifecycle issues.
The async API's global httpx.AsyncClient (cached via @cached_property) breaks
when asyncio.run() destroys and recreates event loops between calls, which
happens in the gateway's thread-pool pattern.

Args:
    prompt (str): The text prompt describing the desired image
    aspect_ratio (str): Image aspect ratio - "landscape", "square", or "portrait" (default: "landscape")
    num_inference_steps (int): Number of denoising steps (1-50, default: 50)
    guidance_scale (float): How closely to follow prompt (0.1-20.0, default: 4.5)
    num_images (int): Number of images to generate (1-4, default: 1)
    output_format (str): Image format "jpeg" or "png" (default: "png")
    seed (Optional[int]): Random seed for reproducible results (optional)

Returns:
    str: JSON string containing minimal generation results:
         {
             "success": bool,
             "image": str or None  # URL of the upscaled image, or None if failed
         }
z-Invalid aspect_ratio '%s', defaulting to '%s'
parametersr   r   r   r   r   r   r   r   r   NsuccessFimages_generatedgeneration_timez*Generating %s image(s) with FLUX 2 Pro: %s:NP   Nz1Prompt is required and must be a non-empty stringr   z$FAL_KEY environment variable not setz' and managed FAL gateway is unavailablenoner   safety_tolerance	sync_modeTz5Submitting generation request to FAL.ai FLUX 2 Pro...z  Model: %sz  Aspect Ratio: %s -> %sz  Steps: %sz  Guidance: %sr   imagesz5Invalid response from FAL.ai API - no images returnedzNo images were generatedrf   r   r   z Using original image as fallbackr   z%No valid image URLs returned from APIc              3   X   "   T F   qP                  R R4      '       g   K  ^x  K"  	  R# 5i)r   FN)r   ).0imgs   & r   	<genexpr>&image_generate_tool.<locals>.<genexpr>  s      Y*:3ggjRW>XQQ*:s   *
*z,Generated %s image(s) in %.1fs (%s upscaled)r   image_generate_tool)indentensure_asciizError generating image: z%sr   
error_type)&lowerr*   DEFAULT_ASPECT_RATIOASPECT_RATIO_MAPr   warningdatetimenowr   r   r$   lenr,   r   r   r   r	   r   ENABLE_SAFETY_CHECKERSAFETY_TOLERANCErW   DEFAULT_MODELr   r   total_secondsre   r   appendsum_debuglog_callsaver^   dumpsr   r   typerl   )r   r   r   r   r   r   r   aspect_ratio_lowerr   debug_call_data
start_timemessagevalidated_paramsrV   r   r   r   r   formatted_imagesr   original_imager   upscaled_countresponse_datar   	error_msgs   &&&&&&&                   r   r   r   `  s   D :F++-335K_!11FVjk1!"45J 	fL*!#6n*]D	
 	5A1O" ""&&(J{G@*UXkZ Z44FLLN8Kq8PPQQ 		)$$(D(F(F<G)++DDW%% 0^X^
 flln*<8!#34I#J./?@*<8-o>#%: 0

	 
4 5 5 $fKLM=1.0BOM#34I#JK$&67G&HI &
 #,,002Z?NNP /TUUHb)788 C#t$$#3u:SWWWa0cggh2" "0E
FLLN!K!$++N; NN#EF16N:.$++N;% (  DEEY*:YYBCHXDY[jlz{ t3C%a(/

 &*	".12B.C*+-<)* 	-?zz-FF G#,,002Z?NNP.s1vh7	T9t4 uTSV$q'**	
 $- -<)*-?zz-FF%GsA   !A?Q# !F5Q# %Q# Q# 
B!Q# ,B6Q# #U.CT?9U?Uc                $    V ^8  d   QhR\         /# r    r"   bool)r%   s   "r   r&   r&     s     H H4 Hr   c                 d    \        \        P                  ! R4      ;'       g    \        4       4      # )z
Check if the FAL.ai API key is available in environment variables.

Returns:
    bool: True if API key is set, False otherwise
r   )r   r   r   r   r   r   r   check_fal_api_keyr     s$     		)$FF(D(FGGr   c                $    V ^8  d   QhR\         /# r   r   )r%   s   "r   r&   r&   #  s      T r   c                 X     \        4       '       g   R# ^ RIp R#   \         d     R# i ; i)z
Check if all requirements for image generation tools are met.

Returns:
    bool: True if requirements are met, False otherwise
FNT)r   r@   ImportError)r@   s    r   #check_image_generation_requirementsr   #  s-    
 "" 	 s     ))c                F    V ^8  d   QhR\         \        \        3,          /# r   )r   r$   r   )r%   s   "r   r&   r&   7  s     % %S#X %r   c                 *    \         P                  4       # )z
Get information about the current debug session.

Returns:
    Dict[str, Any]: Dictionary containing debug session information
)r   get_session_infor   r   r   get_debug_session_infor   7  s     ""$$r   __main__u@   🎨 Image Generation Tools Module - FLUX 2 Pro + Auto Upscalingu(   ❌ FAL_KEY environment variable not setz7Please set your API key: export FAL_KEY='your-key-here'zGet API key at: https://fal.ai/u   ✅ FAL.ai API key foundu    ✅ fal_client library availableu    ❌ fal_client library not foundz&Please install: pip install fal-clientu-   🛠️ Image generation tools ready for use!u   🤖 Using model: u   🔍 Auto-upscaling with: z (zx)u&   🐛 Debug mode ENABLED - Session ID: z9   Debug logs will be saved to: ./logs/image_tools_debug_z.jsonu?   🐛 Debug mode disabled (set IMAGE_TOOLS_DEBUG=true to enable)z
Basic usage:z7  from image_generation_tool import image_generate_toolz  import asyncior(   z  async def main():z2      # Generate image with automatic 2x upscalingz)      result = await image_generate_tool(zD          prompt='A serene mountain landscape with cherry blossoms',z%          image_size='landscape_4_3',z          num_images=1z      )z      print(result)z  asyncio.run(main())z
Supported image sizes:z  - z5  - Custom: {'width': 512, 'height': 768} (if needed)z
Acceleration modes:z
Example prompts:zH  - 'A candid street photo of a woman with a pink bob and bold eyeliner'zE  - 'Modern architecture building with glass facade, sunset lighting'z=  - 'Abstract art with vibrant colors and geometric patterns'z?  - 'Portrait of a wise old owl perched on ancient tree branch'z;  - 'Futuristic cityscape with flying cars and neon lights'z
Debug mode:z  # Enable debug loggingz  export IMAGE_TOOLS_DEBUG=truez=  # Debug logs capture all image generation calls and resultsz5  # Logs saved to: ./logs/image_tools_debug_UUID.json)registrynameimage_generatedescriptiona  Generate high-quality images from text prompts using FLUX 2 Pro model with automatic 2x upscaling. Creates detailed, artistic images that are automatically upscaled for hi-rez results. Returns a single upscaled image URL. Display it using markdown: ![description](URL)r   r   object
propertiesr   stringzJThe text prompt describing the desired image. Be detailed and descriptive.r   enumzlThe aspect ratio of the generated image. 'landscape' is 16:9 wide, 'portrait' is 16:9 tall, 'square' is 1:1.defaultrequiredc           
          V P                  R R4      pV'       g   \        P                  ! RR/4      # \        VV P                  RR4      ^2R^RRR	7      # )
r   r(   r   z'prompt is required for image generationr   r
   r   r   N)r   r   r   r   r   r   r   )r   r^   r   r   )argskwr   s   &, r   _handle_image_generater    sW    XXh#Fzz7$MNOOXXnk: r   	image_genu   🎨)r   toolsetschemar   check_fnrequires_envis_asyncemoji)r   r   portrait_4_3r   landscape_4_3r   )r   regularhigh)r   z<============================================================)r
   r   r   )Mrp   r^   loggingr   r   	threadingr   typingr   r   r   r   urllib.parser   r@   tools.debug_helpersr   tools.managed_tool_gatewayr   tools.tool_backend_helpersr	   	getLoggerrl   r   r   r   DEFAULT_NUM_INFERENCE_STEPSDEFAULT_GUIDANCE_SCALEDEFAULT_NUM_IMAGESDEFAULT_OUTPUT_FORMATr   r   r   listkeysVALID_ASPECT_RATIOSr   r   r   r   r   r   r   r   r   r   r   r   r   rw   rx   Lockrv   r   r.   r0   r{   r   r   r   r   r   r   r   printapi_availableexitr   active
session_idsizemodetools.registryr   IMAGE_GENERATE_SCHEMAr  registerr   r   r   <module>r,     sF  :   	    - - "  , C A			8	$ $"          !k 
 +0023  + > K    !    6 	m-@	A ! $>>+ 5#L
 L
^#(FR:~ -:2(.vGrH(% z 

LM	(O &'M89GH/0Q()01 

9:	}o
./	&~&6b8I
LM }}}6v7H7H6IJKI&J[J[I\\abcOP	
	
CD	
	"I	
 	
>?	
56	
PQ	
12	
"#	)	
 	
!"	
$%!TFm "	
AB	
!"(TFm ) 

	
TU	
QR	
IJ	
KL	
GH	/	
$%	
+,	
IJ	
AB $   bk ;   N;	
 	XJ , 	  	 "0
	  0167Qs   L L98L9