feat: support multiple reference images with model-aware API mapping
All checks were successful
Continuous Integration / Build Package (push) Successful in 31s
Continuous Integration / Lint, Check & Test (push) Successful in 49s

Replace singular reference_image field with reference_images list to
support an arbitrary number of reference images. Map them to the correct
BFL API parameter names based on model family:
- flux-2-*: input_image, input_image_2, ..., input_image_8
- flux-kontext-*: input_image, input_image_2, ..., input_image_4
- flux 1.x: image_prompt (single)

BREAKING CHANGE: reference_image config field renamed to reference_images (list).
This commit is contained in:
Konstantin Fickel 2026-02-14 17:19:54 +01:00
parent b69c38ac13
commit d565329e16
Signed by: kfickel
GPG key ID: A793722F9933C1A5
8 changed files with 112 additions and 23 deletions

View file

@ -45,7 +45,7 @@ class TestLoadConfig:
"width": 1920,
"height": 480,
"inputs": ["ref.png"],
"reference_image": "ref.png",
"reference_images": ["ref.png"],
"control_images": ["ctrl.png"],
},
"story.md": {
@ -66,7 +66,7 @@ class TestLoadConfig:
assert banner.model == "flux-dev"
assert banner.width == 1920
assert banner.height == 480
assert banner.reference_image == "ref.png"
assert banner.reference_images == ["ref.png"]
assert banner.control_images == ["ctrl.png"]
story = config.targets["story.md"]