falaw.operations.images#
Image-generation and image-manipulation operations.
Functions
|
Place a character into an environment as one composited still. |
|
Edit an image with a natural-language instruction. |
|
Generate an image from a text prompt. |
|
Generate a new image conditioned on one or more reference images. |
|
Remove the background from an image. |
|
Upscale an image. |
- falaw.operations.images.composite_character_in_environment(character_image_url, environment_image_url, *, prompt='', quality='balanced', model_id=None, extra=None)[source]#
Place a character into an environment as one composited still.
The single most user-visible primitive missing from muvid (per interface_design_plan item E). With this, an agent can produce “Thor in a bell tower” — the character anchor for a downstream omnihuman lipsync — without manually compositing in an image editor.
Defaults to
fal-ai/flux-kontext/dev(image_edit category at balanced/high tier). Passmodel_idto override (e.g."fal-ai/flux-pro/kontext/max"for highest quality, or"fal-ai/bytedance/seededit/v3/edit-image"for SeedEdit).- Return type:
- falaw.operations.images.edit_image(image_url, prompt, *, quality='balanced', model_id=None, extra=None)[source]#
Edit an image with a natural-language instruction.
- Return type:
- falaw.operations.images.generate_image(prompt, *, quality='balanced', image_size='landscape_4_3', model_id=None, extra=None)[source]#
Generate an image from a text prompt.
image_sizeis a fal preset (landscape_16_9…); models that size byaspect_ratio(nano-banana-pro) get the equivalent ratio, withextra={"resolution": "2K"}for the pixel tier. A prompt over the model’s cap raisesfalaw.FalPromptTooLongbefore any call. Checkfalaw.model_params()for enums whose default may not be what you want (Recraftstyledefaults to photoreal).- Return type:
- falaw.operations.images.generate_image_with_refs(prompt, reference_image_urls, *, quality='balanced', model_id=None, extra=None)[source]#
Generate a new image conditioned on one or more reference images.
The missing twin of
generate_image(): text-to-image models silently ignore reference images, so callers wanting a recurring subject to stay consistent (a character’s face across storyboard panels) need a model that actually ingests references. This routes to theimage_editcategory (Flux Kontext et al.) and threads the references asimage_url(first)image_urls(all) — the same wire shape image-edit models understand.
Pass
model_idto override the picked model.- Return type: