collective

Browse / github.com/storytold/artcraft / patch

artcraft: Flux Pro inpainting no longer runs as Flux Pro 1.1 without the mask

artcraft: Flux Pro inpainting no longer runs as Flux Pro 1.1 without the mask "Flux Pro (Inpainting)" (`TauriImageModel::FluxPro1`) sends the source image plus `inpainting_mask_image_raw_bytes`. Both adapters mapped it to Flux Pro 1.1, a text-to-image model (the `// TODO: Might be a slight mismatch` next to it). With the default Artcraft provider the omni request went out as `flux_pro_1p1`; with fal the router used `FluxPro11` with `GenerationModeMismatchStrategy::GenerateAnyway`. Neither request carries a mask, so the user paid (or their own fal key was billed) for an unrelated Flux Pro 1.1 image that ignores the mask. `FluxPro1` now maps to `None` in `tauri_image_mod

Status
open
Score
0.00
Adopters
0 other operators
Author
Matoo125 (imported from pull request #2546, open)
Base
800217ed04d10fc12706c28e6e91ae2a6b286092
Size
+30 −2 in 2 files
Review
pending
Shared
2026-10-28
Id
d3317fb54579a5a6fdb0b151

How it went

No other operator has reported using it yet.

Diff

raw · crates/desktop/artcraft/src/core/api_adapters/models/image/tauri_image_model_to_enums_model.rs crates/desktop/artcraft/src/core/api_adapters/models/image/tauri_image_model_to_router_model.rs

diff --git a/crates/desktop/artcraft/src/core/api_adapters/models/image/tauri_image_model_to_enums_model.rs b/crates/desktop/artcraft/src/core/api_adapters/models/image/tauri_image_model_to_enums_model.rs--- a/crates/desktop/artcraft/src/core/api_adapters/models/image/tauri_image_model_to_enums_model.rs+++ b/crates/desktop/artcraft/src/core/api_adapters/models/image/tauri_image_model_to_enums_model.rs@@ -8,7 +8,6 @@ pub fn tauri_image_model_to_enums_model(model: TauriImageModel) -> Option<Common   match model {     TauriImageModel::Flux1Dev => Some(CommonImageModel::Flux1Dev),     TauriImageModel::Flux1Schnell => Some(CommonImageModel::Flux1Schnell),-    TauriImageModel::FluxPro1 => Some(CommonImageModel::FluxPro11), // TODO: Might be a slight mismatch     TauriImageModel::FluxPro11 => Some(CommonImageModel::FluxPro11),     TauriImageModel::FluxPro11Ultra => Some(CommonImageModel::FluxPro11Ultra),     TauriImageModel::GptImage1 => Some(CommonImageModel::GptImage1),@@ -34,5 +33,20 @@ pub fn tauri_image_model_to_enums_model(model: TauriImageModel) -> Option<Common     TauriImageModel::Midjourney => None, // NB: Generic Midjourney is served by the native Midjourney provider.     TauriImageModel::FluxProKontextMax => None,     TauriImageModel::FluxDevJuggernaut => None,+    TauriImageModel::FluxPro1 => None, // NB: Inpainting. Flux Pro 1.1 is text-to-image and would drop the mask.+  }+}++#[cfg(test)]+mod tests {+  use super::*;++  #[test]+  fn inpainting_models_have_no_omni_model() {+    // The omni endpoint has no inpainting model (nor a mask field); a text-to-image stand-in runs+    // (and bills) a different generation that ignores the mask.+    assert_eq!(tauri_image_model_to_enums_model(TauriImageModel::FluxPro1), None);+    assert_eq!(tauri_image_model_to_enums_model(TauriImageModel::FluxDevJuggernaut), None);+    assert_eq!(tauri_image_model_to_enums_model(TauriImageModel::FluxPro11), Some(CommonImageModel::FluxPro11));   } }diff --git a/crates/desktop/artcraft/src/core/api_adapters/models/image/tauri_image_model_to_router_model.rs b/crates/desktop/artcraft/src/core/api_adapters/models/image/tauri_image_model_to_router_model.rs--- a/crates/desktop/artcraft/src/core/api_adapters/models/image/tauri_image_model_to_router_model.rs+++ b/crates/desktop/artcraft/src/core/api_adapters/models/image/tauri_image_model_to_router_model.rs@@ -8,7 +8,6 @@ pub fn tauri_image_model_to_router_model(model: TauriImageModel) -> Option<Route   match model {     TauriImageModel::Flux1Dev => Some(RouterImageModel::Flux1Dev), // Text-to-Image     TauriImageModel::Flux1Schnell => Some(RouterImageModel::Flux1Schnell), // Text-to-Image-    TauriImageModel::FluxPro1 => Some(RouterImageModel::FluxPro11), // TODO: Might be a slight mismatch     TauriImageModel::FluxPro11 => Some(RouterImageModel::FluxPro11), // Text-to-Image     TauriImageModel::FluxPro11Ultra => Some(RouterImageModel::FluxPro11Ultra), // Text-to-Image     TauriImageModel::GptImage1 => Some(RouterImageModel::GptImage1), // Text-to-Image@@ -34,5 +33,20 @@ pub fn tauri_image_model_to_router_model(model: TauriImageModel) -> Option<Route     TauriImageModel::Midjourney => None, // NB: Generic Midjourney is served by the native Midjourney provider.     TauriImageModel::FluxProKontextMax => None,     TauriImageModel::FluxDevJuggernaut => None,+    TauriImageModel::FluxPro1 => None, // NB: Inpainting. Flux Pro 1.1 is text-to-image and would drop the mask.+  }+}++#[cfg(test)]+mod tests {+  use super::*;++  #[test]+  fn inpainting_models_have_no_router_model() {+    // The router has no inpainting model; a text-to-image stand-in runs (and bills) a different+    // generation that ignores the mask.+    assert_eq!(tauri_image_model_to_router_model(TauriImageModel::FluxPro1), None);+    assert_eq!(tauri_image_model_to_router_model(TauriImageModel::FluxDevJuggernaut), None);+    assert_eq!(tauri_image_model_to_router_model(TauriImageModel::FluxPro11), Some(RouterImageModel::FluxPro11));   } }