o
    i '                     @  s   d dl mZ d dlmZ d dlmZmZmZ d dlm	Z	m
Z
mZmZ G dd deeZG dd de	ZG d	d
 d
e	ZG dd de	ZG dd de	ZG dd de	ZG dd de	ZG dd de	ZG dd deeZG dd de	ZdS )    )annotations)Enum)AnyDictOptional)	BaseModelFieldconfloatconintc                   @  s   e Zd ZdZdZdS )BFLOutputFormatpngjpegN)__name__
__module____qualname__r   r    r   r   6/mnt/c/Users/fbmor/ComfyUI/comfy_api_nodes/apis/bfl.pyr   	   s    r   c                   @  s  e Zd ZU edddZded< edddZded	< edd
dZded< edddZded< edddZ	ded< edddZ
ded< edddZded< edddZded< edddZded< edddZded< eejd d!gd"Zd#ed$< edd%dZded&< dS )'BFLFluxExpandImageRequest.The description of the changes you want to make. This text guides the expansion process, allowing you to specify features, styles, or modifications for the expanded areas.descriptionstrpromptNwWhether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generation.Optional[bool]prompt_upsampling#The seed value for reproducibility.Optional[int]seedz2Number of pixels to expand at the top of the imagezconint(ge=0, le=2048)topz5Number of pixels to expand at the bottom of the imagebottomz8Number of pixels to expand at the left side of the imageleftz9Number of pixels to expand at the right side of the imageright0Number of steps for the image generation processconint(ge=15, le=50)steps2Guidance strength for the image generation processconfloat(ge=1.5, le=100)guidance   {Tolerance level for input and output moderation. Between 0 and 6, 0 being most strict, 6 being least strict. Defaults to 2.Optional[conint(ge=0, le=6)]safety_tolerance>Output format for the generated image. Can be 'jpeg' or 'png'.r   r   examplesOptional[BFLOutputFormat]output_formatzAA Base64-encoded string representing the image you wish to expandimage)r   r   r   r   r   __annotations__r   r   r   r    r!   r"   r%   r(   r,   r   r   r1   r2   r   r   r   r   r      s&   
 
r   c                   @  s   e Zd ZU edddZded< edddZded	< edd
dZded< edddZded< edddZ	ded< edddZ
ded< eejddgdZded< edddZded< edddZded< dS ) BFLFluxFillImageRequest.r   r   r   r   Nr   r   r   r   r   r   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r   r.   r0   r1   zeA Base64-encoded string representing the image you wish to modify. Can contain alpha mask if desired.r2   zNA Base64-encoded string representing the mask of the areas you with to modify.mask)r   r   r   r   r   r3   r   r   r%   r(   r,   r   r   r1   r2   r5   r   r   r   r   r4   #   s    
 
r4   c                   @  s   e Zd ZU edddZded< edddZded	< edd
dZded< edddZded< edddZ	ded< edddZ
ded< eejddgdZded< edddZded< dS ) BFLFluxProGenerateRequest.%The text prompt for image generation.r   r   r   Nr   r   r   r   r   r      zAWidth of the generated image in pixels. Must be a multiple of 32.zconint(ge=256, le=1440)width   zBHeight of the generated image in pixels. Must be a multiple of 32.heightr)   r*   r+   r,   r-   r   r.   r0   r1   (Optional image to remix in base64 formatOptional[str]image_prompt)r   r   r   r   r   r3   r   r   r9   r;   r,   r   r   r1   r>   r   r   r   r   r6   5   s   
 
r6   c                   @  sF  e Zd ZU edZded< edddZded< ed	ddZded
< edZded< edZ	ded< edddZ
ded< edddZded< edddZded< edddZded< edddZded< edddZded< edddZded< edddZded< edddZded< edddddZded< ed d!dZded"< dS )#Flux2ProGenerateRequest.r   r   r8   zMust be a multiple of 32.r   intr9   r:   r;   Nz
int | Noner   zbool | Noner   z2Base64 encoded image for image-to-image generationz
str | Noneinput_imageinput_image_2input_image_3input_image_4input_image_5input_image_6input_image_7input_image_8input_image_9   zKTolerance level for input and output moderation. Value 0 being most strict.r   r   geler,   r   r-   r1   )r   r   r   r   r   r3   r9   r;   r   r   rA   rB   rC   rD   rE   rF   rG   rH   rI   r,   r1   r   r   r   r   r?   I   s*   
 r?   c                   @  s   e Zd ZU edddZded< edddZded	< edd
dZded< edddZded< edddZ	ded< edddZ
ded< eejddgdZded< edddZded< edddZded < dS )! BFLFluxKontextProGenerateRequest.z+The text prompt for what you wannt to edit.r   r   r   NzImage to edit in base64 formatr=   rA   r   r   r   r&   zconfloat(ge=0.1, le=99.0)r(   r#   zconint(ge=1, le=150)r%      z{Tolerance level for input and output moderation. Between 0 and 2, 0 being most strict, 6 being least strict. Defaults to 2.zOptional[conint(ge=0, le=2)]r,   r-   r   r.   r0   r1   0Aspect ratio of the image between 21:9 and 9:21.aspect_ratior   r   r   )r   r   r   r   r   r3   rA   r   r(   r%   r,   r   r   r1   rQ   r   r   r   r   r   rN   `   s    
 
rN   c                   @  s   e Zd ZU edddZded< edddZded	< edd
dZded< edddZded< edddZ	ded< ee
jddgdZded< edddZded< edddZded< edddZded< dS ) BFLFluxProUltraGenerateRequest.r7   r   r   r   Nr   r   r   r   r   r   rP   r=   rQ   r)   r*   r+   r,   r-   r   r.   r0   r1   z5Generate less processed, more natural-looking images.rawr<   r>   z.Blend between the prompt and the image prompt.z"Optional[confloat(ge=0.0, le=1.0)]image_prompt_strength)r   r   r   r   r   r3   r   r   rQ   r,   r   r   r1   rS   r>   rT   r   r   r   r   rR   r   s$   
 
rR   c                   @  sJ   e Zd ZU edddZded< edddZded< edd	dZd
ed< dS )BFLFluxProGenerateResponse..The unique identifier for the generation task.r   r   idz&URL to poll for the generation result.polling_urlNzPrice in centszfloat | Nonecost)r   r   r   r   rW   r3   rX   rY   r   r   r   r   rU      s   
 rU   c                   @  s$   e Zd ZdZdZdZdZdZdZdS )	BFLStatuszTask not foundPendingzRequest ModeratedzContent ModeratedReadyErrorN)	r   r   r   task_not_foundpendingrequest_moderatedcontent_moderatedreadyerrorr   r   r   r   rZ      s    rZ   c                   @  sb   e Zd ZU edddZded< edddZded< ed	d
dZded< ed	ddddZded< d	S )BFLFluxStatusResponse.rV   r   r   rW   zThe status of the task.rZ   statusNz/The result of the task (null if not completed).zOptional[Dict[str, Any]]resultz&The progress of the task (0.0 to 1.0).g        g      ?rK   zOptional[float]progress)	r   r   r   r   rW   r3   re   rf   rg   r   r   r   r   rd      s
   
 rd   N)
__future__r   enumr   typingr   r   r   pydanticr   r   r	   r
   r   r   r   r4   r6   r?   rN   rR   rU   rZ   rd   r   r   r   r   <module>   s    	