@shop-os/modelkit 0.3.6 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -9,6 +9,11 @@ header in the release PR.
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [0.3.7] - Unreleased
13
+
14
+ ### Fixed
15
+ - `flux-2-pro` with no reference image sent Prodia's `inference.flux-2.pro.img2img.v1` job, which rejects a request without an input image (400 `at least one input image is required`), so every text-only prompt failed. The adapter now sends `inference.flux-2.pro.txt2img.v1` when there are no references and keeps `img2img` when there is at least one.
16
+
12
17
  ## [0.3.6] - Unreleased
13
18
 
14
19
  ### Added
package/dist/index.cjs CHANGED
@@ -6868,6 +6868,7 @@ var openaiImageAdapter = {
6868
6868
 
6869
6869
  // src/adapters/prodia.ts
6870
6870
  var PRODIA_JOB_URL = "https://inference.prodia.com/v2/job";
6871
+ var FLUX_2_PRO_T2I_JOB = "inference.flux-2.pro.txt2img.v1";
6871
6872
  var FLUX_2_PRO_JOB = "inference.flux-2.pro.img2img.v1";
6872
6873
  var FLUX_KLEIN_T2I_JOB = "inference.flux-2.klein.txt2img.v1";
6873
6874
  var FLUX_KLEIN_I2I_JOB = "inference.flux-2.klein.img2img.v1";
@@ -7040,7 +7041,7 @@ async function generateProdiaImage(req, ctx) {
7040
7041
  safety_tolerance: 5
7041
7042
  };
7042
7043
  if (req.seed !== void 0) config.seed = req.seed;
7043
- job = { type: FLUX_2_PRO_JOB, config };
7044
+ job = { type: refs.length > 0 ? FLUX_2_PRO_JOB : FLUX_2_PRO_T2I_JOB, config };
7044
7045
  inputs = refs;
7045
7046
  accept = "image/png";
7046
7047
  mime = "image/png";