diff --git a/package-lock.json b/package-lock.json index f70425e..0d9275a 100755 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@raycast/api": "^1.80.0", "duck-duck-scrape": "^2.2.5", "fetch-to-curl": "^0.6.0", - "g4f-image": "^1.2.0", + "g4f-image": "^1.3.3", "gemini-g4f": "^12.3.10-beta.1", "lodash.throttle": "^4.1.1", "node-fetch": "^3.3.2", @@ -1567,9 +1567,9 @@ "dev": true }, "node_modules/g4f-image": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/g4f-image/-/g4f-image-1.2.0.tgz", - "integrity": "sha512-chDZ/gWUb8q/C64Gh/UwYxKns+tD7U8nVJsTmyoRyhcD9edPIZGumITGuMhr4AquvQm2SRnznreQ3L4T4obqZg==" + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/g4f-image/-/g4f-image-1.3.3.tgz", + "integrity": "sha512-g37cgBKKlb9SrTCgoyShoswC2YbcKdKhabeLL7ioz8n+yJK6Bwm1YsW7daV/Lf762DYni1TTr5jWR/ofeVERjw==" }, "node_modules/gemini-g4f": { "version": "12.3.10-beta.1", diff --git a/package.json b/package.json index b5943fe..a35f996 100755 --- a/package.json +++ b/package.json @@ -828,7 +828,7 @@ "@raycast/api": "^1.80.0", "duck-duck-scrape": "^2.2.5", "fetch-to-curl": "^0.6.0", - "g4f-image": "^1.2.0", + "g4f-image": "^1.3.3", "gemini-g4f": "^12.3.10-beta.1", "lodash.throttle": "^4.1.1", "node-fetch": "^3.3.2", diff --git a/src/genImage.jsx b/src/genImage.jsx index ca5a492..bd7f371 100644 --- a/src/genImage.jsx +++ b/src/genImage.jsx @@ -16,6 +16,7 @@ import fs from "fs"; import fetch from "node-fetch"; import { Storage } from "./api/storage.js"; +import { Preferences } from "./api/preferences.js"; import { formatDate, getSupportPath } from "./helpers/helper.js"; import { help_action } from "./helpers/helpPage.jsx"; @@ -37,6 +38,12 @@ const image_providers = { samplingMethod: "DPM++ 2M Karras", }, }, + NexraFlux: { + model: "flux", + }, + NexraMidjourney: { + model: "midjourney", + }, DeepInfraFlux1Dev: { model: "black-forest-labs/FLUX-1-dev", data: { @@ -68,6 +75,8 @@ const image_providers = { const provider_map = { Prodia: provider.Nexra, ProdiaStableDiffusion: provider.Nexra, + NexraFlux: provider.Nexra, + NexraMidjourney: provider.Nexra, DeepInfraFlux1Dev: provider.DeepInfra, DeepInfraFlux1Schnell: provider.DeepInfra, StableDiffusionLite: provider.Nexra, @@ -80,7 +89,7 @@ const provider_map = { const default_models = { Prodia: "ICantBelieveItsNotPhotography_seco.safetensors [4e7a3dfd]", ProdiaStableDiffusion: "neverendingDream_v122.safetensors [f964ceeb]", - Rocks: "flux", + Rocks: "flux-4o", }; const defaultImageProvider = "Prodia"; @@ -152,7 +161,7 @@ export default function genImage() { try { const [provider, options] = loadImageOptions(currentChat); - const base64Image = await generate(query, provider, options, { fetch: fetch }); + const base64Image = await generate(query, provider, options, { fetch: fetch, debug: Preferences["devMode"] }); // save image let imagePath = ""; @@ -240,6 +249,8 @@ export default function genImage() { + + @@ -678,7 +689,6 @@ const loadImageOptions = (currentChat) => { let model = !modelString || modelString === "default" ? default_models[providerString] : modelString; if (model) { - options.model = model; data = { ...data, model: model }; }