Documentation Index
Fetch the complete documentation index at: https://docs.pixeltable.com/llms.txt
Use this file to discover all available pages before exploring further.
module pixeltable.functions.bfl
Pixeltable UDFs that wrap Black Forest Labs (BFL) FLUX image generation API. In order to use them, the API key must be specified either withBFL_API_KEY environment variable, or as api_key
in the bfl section of the Pixeltable config file.
For more information on FLUX models, see the BFL documentation.
udf edit()
Signature
prompt(pxt.String): Text description of the edit to apply.image(pxt.Image): The base image to edit.model(pxt.String): The FLUX model to use for editing. See available models at https://docs.bfl.ai/.reference_images(pxt.Json[(Image): Additional reference images (up to 7) for multi-reference editing.width(Any): Output width in pixels (multiple of 16). Matches input if not specified.height(Any): Output height in pixels (multiple of 16). Matches input if not specified.seed(Any): Random seed for reproducible results.safety_tolerance(Any): Moderation level from 0 (strict) to 6 (permissive). Default 2.output_format(Any): Image format, ‘jpeg’ or ‘png’. Default ‘jpeg’.steps(Any): Number of inference steps (flux-2-flex only, max 50).guidance(Any): Guidance scale 1.5-10 (flux-2-flex only). Default 4.5.
pxt.Image: An edited PIL Image.
udf expand()
Signature
prompt(pxt.String): Text description to guide the expansion.image(pxt.Image): The base image to expand.model(pxt.String): The FLUX Expand model to use. See available models at https://docs.bfl.ai/.top(pxt.Int): Pixels to add to the top edge.bottom(pxt.Int): Pixels to add to the bottom edge.left(pxt.Int): Pixels to add to the left edge.right(pxt.Int): Pixels to add to the right edge.seed(pxt.Int | None): Random seed for reproducible results.safety_tolerance(pxt.Int | None): Moderation level from 0 (strict) to 6 (permissive). Default 2.output_format(pxt.String | None): Image format, ‘jpeg’ or ‘png’. Default ‘jpeg’.
pxt.Image: An expanded PIL Image.
udf fill()
Signature
prompt(pxt.String): Text description of what to fill in the masked area.image(pxt.Image): The base image to inpaint.mask(pxt.Image): Mask image where white areas indicate regions to fill (black areas preserved).model(pxt.String): The FLUX Fill model to use. See available models at https://docs.bfl.ai/.steps(pxt.Int | None): Number of inference steps (max 50). Default 50.guidance(pxt.Float | None): Guidance scale for generation. Default 30.seed(pxt.Int | None): Random seed for reproducible results.safety_tolerance(pxt.Int | None): Moderation level from 0 (strict) to 6 (permissive). Default 2.output_format(pxt.String | None): Image format, ‘jpeg’ or ‘png’. Default ‘jpeg’.
pxt.Image: An inpainted PIL Image.
udf generate()
Signature
prompt(pxt.String): Text description of the image to generate.model(pxt.String): The FLUX model to use. See available models at https://docs.bfl.ai/.width(pxt.Int | None): Output width in pixels (multiple of 16). Default 1024.height(pxt.Int | None): Output height in pixels (multiple of 16). Default 1024.seed(pxt.Int | None): Random seed for reproducible results.safety_tolerance(pxt.Int | None): Moderation level from 0 (strict) to 6 (permissive). Default 2.output_format(pxt.String | None): Image format, ‘jpeg’ or ‘png’. Default ‘jpeg’.steps(pxt.Int | None): Number of inference steps (flux-2-flex only, max 50).guidance(pxt.Float | None): Guidance scale 1.5-10 (flux-2-flex only). Default 4.5.
pxt.Image: A generated PIL Image.