omnius 1.0.22 → 1.0.23
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/dist/index.js +112 -134
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -250342,6 +250342,12 @@ import { spawn as spawn9 } from "node:child_process";
|
|
|
250342
250342
|
import { existsSync as existsSync23, statSync as statSync8 } from "node:fs";
|
|
250343
250343
|
import { chmod as chmod3, mkdir as mkdir11, writeFile as writeFile16 } from "node:fs/promises";
|
|
250344
250344
|
import { join as join36, resolve as resolve18 } from "node:path";
|
|
250345
|
+
function officialBflModel(model) {
|
|
250346
|
+
return `${OFFICIAL_BFL_ORG}/${model}`;
|
|
250347
|
+
}
|
|
250348
|
+
function normalizeImageGenerationModel(model) {
|
|
250349
|
+
return IMAGE_GENERATION_MODEL_REPLACEMENTS.get(model) ?? model;
|
|
250350
|
+
}
|
|
250345
250351
|
function parsePercent(text) {
|
|
250346
250352
|
const match = text.match(/\b(\d{1,3})%\b/);
|
|
250347
250353
|
if (!match)
|
|
@@ -250404,7 +250410,8 @@ function isBackend(value2) {
|
|
|
250404
250410
|
function getImageGenerationPreset(model) {
|
|
250405
250411
|
if (!model)
|
|
250406
250412
|
return void 0;
|
|
250407
|
-
|
|
250413
|
+
const resolved = normalizeImageGenerationModel(model);
|
|
250414
|
+
return IMAGE_GENERATION_MODEL_PRESETS.find((preset) => preset.id === resolved);
|
|
250408
250415
|
}
|
|
250409
250416
|
function imageGenerationQualityLadder() {
|
|
250410
250417
|
return IMAGE_GENERATION_QUALITY_LADDER.map((id) => getImageGenerationPreset(id)).filter((preset) => Boolean(preset));
|
|
@@ -250412,32 +250419,35 @@ function imageGenerationQualityLadder() {
|
|
|
250412
250419
|
function imageGenerationFallbackAlternates(model) {
|
|
250413
250420
|
if (!model)
|
|
250414
250421
|
return [];
|
|
250415
|
-
|
|
250422
|
+
const resolved = normalizeImageGenerationModel(model);
|
|
250423
|
+
return IMAGE_GENERATION_MODEL_PRESETS.filter((preset) => preset.fallbackFor?.includes(resolved));
|
|
250416
250424
|
}
|
|
250417
250425
|
function inferImageGenerationBackend(model, requested) {
|
|
250418
250426
|
if (requested && isBackend(requested))
|
|
250419
250427
|
return requested;
|
|
250420
250428
|
if (!model || model === "auto")
|
|
250421
250429
|
return "auto";
|
|
250422
|
-
const
|
|
250430
|
+
const resolved = normalizeImageGenerationModel(model);
|
|
250431
|
+
const preset = getImageGenerationPreset(resolved);
|
|
250423
250432
|
if (preset)
|
|
250424
250433
|
return preset.backend;
|
|
250425
|
-
if (
|
|
250434
|
+
if (resolved.startsWith("x/"))
|
|
250426
250435
|
return "ollama";
|
|
250427
|
-
if (
|
|
250436
|
+
if (resolved === "sdcpp" || resolved.startsWith("sdcpp:"))
|
|
250428
250437
|
return "sdcpp";
|
|
250429
|
-
if (
|
|
250438
|
+
if (resolved.startsWith("/") || resolved.endsWith(".gguf") || resolved.endsWith(".safetensors") || resolved.endsWith(".ckpt"))
|
|
250430
250439
|
return "sdcpp";
|
|
250431
250440
|
return "diffusers";
|
|
250432
250441
|
}
|
|
250433
250442
|
function imageCandidateFor(model, requestedBackend) {
|
|
250434
|
-
|
|
250443
|
+
const resolved = normalizeImageGenerationModel(model);
|
|
250444
|
+
let backend = inferImageGenerationBackend(resolved, requestedBackend);
|
|
250435
250445
|
if (backend === "auto")
|
|
250436
250446
|
backend = "diffusers";
|
|
250437
250447
|
return {
|
|
250438
|
-
model,
|
|
250448
|
+
model: resolved,
|
|
250439
250449
|
backend,
|
|
250440
|
-
preset: getImageGenerationPreset(
|
|
250450
|
+
preset: getImageGenerationPreset(resolved)
|
|
250441
250451
|
};
|
|
250442
250452
|
}
|
|
250443
250453
|
function imageGenerationFallbackCandidates(requestedModel, requestedBackend, allowFallback = true) {
|
|
@@ -250460,7 +250470,8 @@ function imageGenerationFallbackCandidates(requestedModel, requestedBackend, all
|
|
|
250460
250470
|
}
|
|
250461
250471
|
if (!allowFallback)
|
|
250462
250472
|
return candidates.length ? candidates : [imageCandidateFor(DEFAULT_DIFFUSERS_IMAGE_MODEL, requestedBackend)];
|
|
250463
|
-
const
|
|
250473
|
+
const normalizedRequestedModel = requestedModel ? normalizeImageGenerationModel(requestedModel) : void 0;
|
|
250474
|
+
const primaryIndex = normalizedRequestedModel ? ladder.findIndex((preset) => preset.id === normalizedRequestedModel) : requestedBackend && requestedBackend !== "auto" ? ladder.findIndex((preset) => preset.backend === requestedBackend) : 0;
|
|
250464
250475
|
const fallbackTail = primaryIndex >= 0 ? ladder.slice(primaryIndex) : ladder;
|
|
250465
250476
|
for (const preset of fallbackTail) {
|
|
250466
250477
|
add2(imageCandidateFor(preset.id));
|
|
@@ -250762,13 +250773,34 @@ function parseRunnerJson(stdout) {
|
|
|
250762
250773
|
}
|
|
250763
250774
|
return null;
|
|
250764
250775
|
}
|
|
250765
|
-
var DEFAULT_DIFFUSERS_IMAGE_MODEL, DEFAULT_OLLAMA_IMAGE_MODEL, DIFFUSERS_PYTHON_PACKAGES, SDCPP_PYTHON_PACKAGES, IMAGE_GENERATION_MODEL_PRESETS, IMAGE_GENERATION_QUALITY_LADDER, OLLAMA_IMAGE_MODELS, DIFFUSERS_RUNNER, SDCPP_RUNNER, ImageGenerateTool;
|
|
250776
|
+
var DEFAULT_DIFFUSERS_IMAGE_MODEL, DEFAULT_OLLAMA_IMAGE_MODEL, SECONDARY_FLUX_DEV_MODEL, SECONDARY_FLUX_DEV_MIRROR_MODEL, SECONDARY_FLUX_DEV_COMFY_MODEL, SECONDARY_FLUX_FILL_MODEL, SECONDARY_FLUX_FILL_FP8_MODEL, SECONDARY_FLUX2_MODEL, OFFICIAL_BFL_ORG, IMAGE_GENERATION_MODEL_REPLACEMENTS, DIFFUSERS_PYTHON_PACKAGES, SDCPP_PYTHON_PACKAGES, IMAGE_GENERATION_MODEL_PRESETS, IMAGE_GENERATION_QUALITY_LADDER, OLLAMA_IMAGE_MODELS, DIFFUSERS_RUNNER, SDCPP_RUNNER, ImageGenerateTool;
|
|
250766
250777
|
var init_image_generate = __esm({
|
|
250767
250778
|
"packages/execution/dist/tools/image-generate.js"() {
|
|
250768
250779
|
"use strict";
|
|
250769
250780
|
init_venv_paths();
|
|
250770
250781
|
DEFAULT_DIFFUSERS_IMAGE_MODEL = "stabilityai/sdxl-turbo";
|
|
250771
250782
|
DEFAULT_OLLAMA_IMAGE_MODEL = "x/z-image-turbo";
|
|
250783
|
+
SECONDARY_FLUX_DEV_MODEL = "lllyasviel/flux1-dev-bnb-nf4";
|
|
250784
|
+
SECONDARY_FLUX_DEV_MIRROR_MODEL = "ChuckMcSneed/FLUX.1-dev";
|
|
250785
|
+
SECONDARY_FLUX_DEV_COMFY_MODEL = "Comfy-Org/flux1-dev";
|
|
250786
|
+
SECONDARY_FLUX_FILL_MODEL = "diffusers/FLUX.1-Fill-dev-nf4";
|
|
250787
|
+
SECONDARY_FLUX_FILL_FP8_MODEL = "boricuapab/flux1-fill-dev-fp8";
|
|
250788
|
+
SECONDARY_FLUX2_MODEL = "x/flux2-klein";
|
|
250789
|
+
OFFICIAL_BFL_ORG = "black-forest-labs";
|
|
250790
|
+
IMAGE_GENERATION_MODEL_REPLACEMENTS = /* @__PURE__ */ new Map([
|
|
250791
|
+
[officialBflModel("FLUX.1-dev"), SECONDARY_FLUX_DEV_MODEL],
|
|
250792
|
+
[officialBflModel("FLUX.1-dev-FP8"), SECONDARY_FLUX_DEV_MODEL],
|
|
250793
|
+
[officialBflModel("FLUX.1-Krea-dev"), SECONDARY_FLUX_DEV_COMFY_MODEL],
|
|
250794
|
+
[officialBflModel("FLUX.1-schnell"), SECONDARY_FLUX_DEV_MODEL],
|
|
250795
|
+
[officialBflModel("FLUX.1-Fill-dev"), SECONDARY_FLUX_FILL_MODEL],
|
|
250796
|
+
[officialBflModel("FLUX.1-Kontext-dev"), SECONDARY_FLUX_DEV_MODEL],
|
|
250797
|
+
[officialBflModel("FLUX.1-Kontext-dev-NVFP4"), SECONDARY_FLUX_DEV_MODEL],
|
|
250798
|
+
[officialBflModel("FLUX.2-klein-4B"), SECONDARY_FLUX2_MODEL],
|
|
250799
|
+
[officialBflModel("FLUX.2-klein-4b-fp8"), SECONDARY_FLUX2_MODEL],
|
|
250800
|
+
[officialBflModel("FLUX.2-klein-4b-nvfp4"), SECONDARY_FLUX2_MODEL],
|
|
250801
|
+
[officialBflModel("FLUX.2-klein-base-4b-fp8"), SECONDARY_FLUX2_MODEL],
|
|
250802
|
+
[officialBflModel("FLUX.2-klein-base-4b-nvfp4"), SECONDARY_FLUX2_MODEL]
|
|
250803
|
+
]);
|
|
250772
250804
|
DIFFUSERS_PYTHON_PACKAGES = [
|
|
250773
250805
|
"torch",
|
|
250774
250806
|
"torchvision",
|
|
@@ -250802,7 +250834,7 @@ var init_image_generate = __esm({
|
|
|
250802
250834
|
note: "Modern fast image model; good default when available in Ollama."
|
|
250803
250835
|
},
|
|
250804
250836
|
{
|
|
250805
|
-
id:
|
|
250837
|
+
id: SECONDARY_FLUX2_MODEL,
|
|
250806
250838
|
label: "FLUX.2 Klein",
|
|
250807
250839
|
backend: "ollama",
|
|
250808
250840
|
install: "ollama pull x/flux2-klein",
|
|
@@ -250818,93 +250850,92 @@ var init_image_generate = __esm({
|
|
|
250818
250850
|
note: "Compact FLUX-family Ollama path for interactive local generation."
|
|
250819
250851
|
},
|
|
250820
250852
|
{
|
|
250821
|
-
id:
|
|
250822
|
-
label: "FLUX.1 dev",
|
|
250853
|
+
id: SECONDARY_FLUX_DEV_MODEL,
|
|
250854
|
+
label: "FLUX.1 dev BNB NF4",
|
|
250823
250855
|
backend: "diffusers",
|
|
250824
|
-
install: 'python3 .omnius/image-gen/diffusers_text2image.py --model
|
|
250856
|
+
install: 'python3 .omnius/image-gen/diffusers_text2image.py --model lllyasviel/flux1-dev-bnb-nf4 --steps 28 --guidance 3.5 --width 1024 --height 1024 --prompt "..." --output .omnius/images/out.png',
|
|
250825
250857
|
category: "Primary hyper-realistic baseline",
|
|
250826
|
-
sizeClass: "12B
|
|
250827
|
-
quality: "
|
|
250828
|
-
minVramGB:
|
|
250829
|
-
recommendedVramGB:
|
|
250830
|
-
deployment: "
|
|
250858
|
+
sizeClass: "12B FLUX.1 dev NF4",
|
|
250859
|
+
quality: "Traceable lower-memory FLUX.1 dev secondary-source route with strong photorealism and prompt adherence; avoids gated official BFL downloads.",
|
|
250860
|
+
minVramGB: 12,
|
|
250861
|
+
recommendedVramGB: 16,
|
|
250862
|
+
deployment: "Best with BNB-aware Diffusers/Forge-style runtimes. Falls through cleanly if the current runner cannot load it.",
|
|
250831
250863
|
steps: 28,
|
|
250832
250864
|
guidance: 3.5,
|
|
250833
250865
|
width: 1024,
|
|
250834
250866
|
height: 1024,
|
|
250835
|
-
note: "Primary serious-generation
|
|
250867
|
+
note: "Primary serious-generation FLUX route using the secondary-source NF4 weights from the research package."
|
|
250836
250868
|
},
|
|
250837
250869
|
{
|
|
250838
|
-
id:
|
|
250839
|
-
label: "FLUX.1 dev
|
|
250870
|
+
id: SECONDARY_FLUX_DEV_MIRROR_MODEL,
|
|
250871
|
+
label: "FLUX.1 dev mirror",
|
|
250840
250872
|
backend: "diffusers",
|
|
250841
|
-
install: 'python3 .omnius/image-gen/diffusers_text2image.py --model
|
|
250842
|
-
category: "
|
|
250843
|
-
sizeClass: "12B FLUX.1 dev
|
|
250844
|
-
quality: "
|
|
250845
|
-
minVramGB:
|
|
250846
|
-
recommendedVramGB:
|
|
250847
|
-
deployment: "
|
|
250873
|
+
install: 'python3 .omnius/image-gen/diffusers_text2image.py --model ChuckMcSneed/FLUX.1-dev --steps 28 --guidance 3.5 --width 1024 --height 1024 --prompt "..." --output .omnius/images/out.png',
|
|
250874
|
+
category: "Traceable FLUX fallback",
|
|
250875
|
+
sizeClass: "12B FLUX.1 dev mirror",
|
|
250876
|
+
quality: "Full FLUX.1 dev mirror fallback from the secondary-source inventory; higher trust than anonymous mirrors, lower priority than quantized routes.",
|
|
250877
|
+
minVramGB: 24,
|
|
250878
|
+
recommendedVramGB: 48,
|
|
250879
|
+
deployment: "Use after the NF4 route if full-weight mirror provenance and license terms are acceptable.",
|
|
250848
250880
|
steps: 28,
|
|
250849
250881
|
guidance: 3.5,
|
|
250850
250882
|
width: 1024,
|
|
250851
250883
|
height: 1024,
|
|
250852
|
-
fallbackFor: [
|
|
250853
|
-
note: "
|
|
250884
|
+
fallbackFor: [SECONDARY_FLUX_DEV_MODEL],
|
|
250885
|
+
note: "Traceable mirror fallback for FLUX.1 dev from the research package."
|
|
250854
250886
|
},
|
|
250855
250887
|
{
|
|
250856
|
-
id:
|
|
250857
|
-
label: "FLUX.1
|
|
250888
|
+
id: SECONDARY_FLUX_DEV_COMFY_MODEL,
|
|
250889
|
+
label: "FLUX.1 dev Comfy-Org",
|
|
250858
250890
|
backend: "diffusers",
|
|
250859
|
-
install: 'python3 .omnius/image-gen/diffusers_text2image.py --model
|
|
250860
|
-
category: "
|
|
250861
|
-
sizeClass: "12B FLUX.1 dev-family",
|
|
250862
|
-
quality: "
|
|
250863
|
-
minVramGB:
|
|
250864
|
-
recommendedVramGB:
|
|
250865
|
-
deployment: "
|
|
250891
|
+
install: 'python3 .omnius/image-gen/diffusers_text2image.py --model Comfy-Org/flux1-dev --steps 28 --guidance 3.5 --width 1024 --height 1024 --prompt "..." --output .omnius/images/out.png',
|
|
250892
|
+
category: "Traceable FLUX fallback",
|
|
250893
|
+
sizeClass: "12B FLUX.1 dev single-file/FP8 family",
|
|
250894
|
+
quality: "ComfyUI-oriented secondary-source FLUX.1 dev route; useful when the quantized/default loader path is unavailable.",
|
|
250895
|
+
minVramGB: 16,
|
|
250896
|
+
recommendedVramGB: 24,
|
|
250897
|
+
deployment: "Best in ComfyUI/single-file workflows; the generic Diffusers runner will try it and fall through if the repo layout is incompatible.",
|
|
250866
250898
|
steps: 28,
|
|
250867
250899
|
guidance: 3.5,
|
|
250868
250900
|
width: 1024,
|
|
250869
250901
|
height: 1024,
|
|
250870
|
-
fallbackFor: [
|
|
250871
|
-
note: "
|
|
250902
|
+
fallbackFor: [SECONDARY_FLUX_DEV_MODEL, SECONDARY_FLUX_DEV_MIRROR_MODEL],
|
|
250903
|
+
note: "Traceable Comfy-Org FLUX.1 fallback from the research package."
|
|
250872
250904
|
},
|
|
250873
250905
|
{
|
|
250874
|
-
id:
|
|
250875
|
-
label: "FLUX.1 dev
|
|
250906
|
+
id: SECONDARY_FLUX_FILL_MODEL,
|
|
250907
|
+
label: "FLUX.1 Fill dev NF4",
|
|
250876
250908
|
backend: "diffusers",
|
|
250877
|
-
install: 'python3 .omnius/image-gen/diffusers_text2image.py --model
|
|
250909
|
+
install: 'python3 .omnius/image-gen/diffusers_text2image.py --model diffusers/FLUX.1-Fill-dev-nf4 --steps 28 --guidance 3.5 --width 1024 --height 1024 --prompt "..." --output .omnius/images/out.png',
|
|
250878
250910
|
category: "Traceable FLUX fallback",
|
|
250879
|
-
sizeClass: "12B FLUX.1
|
|
250880
|
-
quality: "Lower-memory
|
|
250911
|
+
sizeClass: "12B FLUX.1 Fill NF4",
|
|
250912
|
+
quality: "Lower-memory fill/inpainting secondary-source route; listed for FLUX-family coverage rather than generic text-to-image priority.",
|
|
250881
250913
|
minVramGB: 12,
|
|
250882
250914
|
recommendedVramGB: 16,
|
|
250883
|
-
deployment: "Best
|
|
250915
|
+
deployment: "Best for fill/inpainting workflows. The generic text-to-image runner may not be the ideal loader, so it is not in the default ladder.",
|
|
250884
250916
|
steps: 28,
|
|
250885
250917
|
guidance: 3.5,
|
|
250886
250918
|
width: 1024,
|
|
250887
250919
|
height: 1024,
|
|
250888
|
-
|
|
250889
|
-
note: "Traceable low-VRAM NF4 fallback for FLUX.1 dev."
|
|
250920
|
+
note: "Traceable NF4 fallback for FLUX.1 Fill dev from the research package."
|
|
250890
250921
|
},
|
|
250891
250922
|
{
|
|
250892
|
-
id:
|
|
250893
|
-
label: "FLUX.1 dev
|
|
250923
|
+
id: SECONDARY_FLUX_FILL_FP8_MODEL,
|
|
250924
|
+
label: "FLUX.1 Fill dev FP8",
|
|
250894
250925
|
backend: "diffusers",
|
|
250895
|
-
install: 'python3 .omnius/image-gen/diffusers_text2image.py --model
|
|
250926
|
+
install: 'python3 .omnius/image-gen/diffusers_text2image.py --model boricuapab/flux1-fill-dev-fp8 --steps 28 --guidance 3.5 --width 1024 --height 1024 --prompt "..." --output .omnius/images/out.png',
|
|
250896
250927
|
category: "Traceable FLUX fallback",
|
|
250897
|
-
sizeClass: "12B FLUX.1
|
|
250898
|
-
quality: "
|
|
250899
|
-
minVramGB:
|
|
250900
|
-
recommendedVramGB:
|
|
250901
|
-
deployment: "
|
|
250928
|
+
sizeClass: "12B FLUX.1 Fill FP8",
|
|
250929
|
+
quality: "Traceable FP8 fill/inpainting conversion from the secondary-source inventory; gated status can vary.",
|
|
250930
|
+
minVramGB: 12,
|
|
250931
|
+
recommendedVramGB: 16,
|
|
250932
|
+
deployment: "Best for fill/inpainting workflows when accepted access terms allow the repo.",
|
|
250902
250933
|
steps: 28,
|
|
250903
250934
|
guidance: 3.5,
|
|
250904
250935
|
width: 1024,
|
|
250905
250936
|
height: 1024,
|
|
250906
|
-
fallbackFor: [
|
|
250907
|
-
note: "Traceable
|
|
250937
|
+
fallbackFor: [SECONDARY_FLUX_FILL_MODEL],
|
|
250938
|
+
note: "Traceable FP8 fallback for FLUX.1 Fill dev from the research package."
|
|
250908
250939
|
},
|
|
250909
250940
|
{
|
|
250910
250941
|
id: "stabilityai/stable-diffusion-3.5-large",
|
|
@@ -250923,23 +250954,6 @@ var init_image_generate = __esm({
|
|
|
250923
250954
|
height: 1024,
|
|
250924
250955
|
note: "Primary serious-generation baseline for the Stable Diffusion ecosystem."
|
|
250925
250956
|
},
|
|
250926
|
-
{
|
|
250927
|
-
id: "black-forest-labs/FLUX.1-schnell",
|
|
250928
|
-
label: "FLUX.1 schnell",
|
|
250929
|
-
backend: "diffusers",
|
|
250930
|
-
install: 'python3 .omnius/image-gen/diffusers_text2image.py --model black-forest-labs/FLUX.1-schnell --steps 4 --guidance 0 --width 1024 --height 1024 --prompt "..." --output .omnius/images/out.png',
|
|
250931
|
-
category: "Fast large-model iteration",
|
|
250932
|
-
sizeClass: "12B rectified-flow transformer",
|
|
250933
|
-
quality: "FLUX-style output with fewer steps; better for rapid iteration than absolute peak quality.",
|
|
250934
|
-
minVramGB: 16,
|
|
250935
|
-
recommendedVramGB: 24,
|
|
250936
|
-
deployment: "Use for fast prompt iteration; verify current license terms before commercial use.",
|
|
250937
|
-
steps: 4,
|
|
250938
|
-
guidance: 0,
|
|
250939
|
-
width: 1024,
|
|
250940
|
-
height: 1024,
|
|
250941
|
-
note: "Fast FLUX-family iteration path."
|
|
250942
|
-
},
|
|
250943
250957
|
{
|
|
250944
250958
|
id: "stabilityai/stable-diffusion-3.5-large-turbo",
|
|
250945
250959
|
label: "SD3.5 Large Turbo",
|
|
@@ -250990,56 +251004,6 @@ var init_image_generate = __esm({
|
|
|
250990
251004
|
height: 1024,
|
|
250991
251005
|
note: "Efficient modern large image model."
|
|
250992
251006
|
},
|
|
250993
|
-
{
|
|
250994
|
-
id: "black-forest-labs/FLUX.2-klein-4B",
|
|
250995
|
-
label: "FLUX.2 Klein 4B",
|
|
250996
|
-
backend: "diffusers",
|
|
250997
|
-
install: 'python3 .omnius/image-gen/diffusers_text2image.py --model black-forest-labs/FLUX.2-klein-4B --steps 8 --width 1024 --height 1024 --prompt "..." --output .omnius/images/out.png',
|
|
250998
|
-
category: "Modern deployable",
|
|
250999
|
-
sizeClass: "4B compact FLUX-family",
|
|
251000
|
-
quality: "Bridge between practical deployment and modern FLUX-family visual quality.",
|
|
251001
|
-
minVramGB: 12,
|
|
251002
|
-
recommendedVramGB: 16,
|
|
251003
|
-
deployment: "Better fit for consumer GPU experimentation than 8B-12B baselines.",
|
|
251004
|
-
steps: 8,
|
|
251005
|
-
width: 1024,
|
|
251006
|
-
height: 1024,
|
|
251007
|
-
note: "More deployable compact FLUX-family model."
|
|
251008
|
-
},
|
|
251009
|
-
{
|
|
251010
|
-
id: "black-forest-labs/FLUX.2-klein-4b-fp8",
|
|
251011
|
-
label: "FLUX.2 Klein 4B FP8",
|
|
251012
|
-
backend: "diffusers",
|
|
251013
|
-
install: 'python3 .omnius/image-gen/diffusers_text2image.py --model black-forest-labs/FLUX.2-klein-4b-fp8 --steps 8 --width 1024 --height 1024 --prompt "..." --output .omnius/images/out.png',
|
|
251014
|
-
category: "Official FLUX fallback",
|
|
251015
|
-
sizeClass: "4B compact FLUX-family FP8",
|
|
251016
|
-
quality: "Official lower-precision FLUX.2 Klein route with better deployment fit than full-precision 4B.",
|
|
251017
|
-
minVramGB: 8,
|
|
251018
|
-
recommendedVramGB: 12,
|
|
251019
|
-
deployment: "Preferred lower-memory official FLUX.2 fallback when compatible with the current loader.",
|
|
251020
|
-
steps: 8,
|
|
251021
|
-
width: 1024,
|
|
251022
|
-
height: 1024,
|
|
251023
|
-
fallbackFor: ["black-forest-labs/FLUX.2-klein-4B", "x/flux2-klein"],
|
|
251024
|
-
note: "Official FP8 fallback for FLUX.2 Klein."
|
|
251025
|
-
},
|
|
251026
|
-
{
|
|
251027
|
-
id: "black-forest-labs/FLUX.2-klein-4b-nvfp4",
|
|
251028
|
-
label: "FLUX.2 Klein 4B NVFP4",
|
|
251029
|
-
backend: "diffusers",
|
|
251030
|
-
install: 'python3 .omnius/image-gen/diffusers_text2image.py --model black-forest-labs/FLUX.2-klein-4b-nvfp4 --steps 8 --width 1024 --height 1024 --prompt "..." --output .omnius/images/out.png',
|
|
251031
|
-
category: "Official FLUX fallback",
|
|
251032
|
-
sizeClass: "4B compact FLUX-family NVFP4",
|
|
251033
|
-
quality: "Official NVIDIA-oriented low-precision FLUX.2 Klein fallback.",
|
|
251034
|
-
minVramGB: 8,
|
|
251035
|
-
recommendedVramGB: 12,
|
|
251036
|
-
deployment: "Use when the runtime/GPU supports the NVFP4 path; otherwise the fallback ladder continues.",
|
|
251037
|
-
steps: 8,
|
|
251038
|
-
width: 1024,
|
|
251039
|
-
height: 1024,
|
|
251040
|
-
fallbackFor: ["black-forest-labs/FLUX.2-klein-4B", "x/flux2-klein", "black-forest-labs/FLUX.2-klein-4b-fp8"],
|
|
251041
|
-
note: "Official NVFP4 fallback for FLUX.2 Klein."
|
|
251042
|
-
},
|
|
251043
251007
|
{
|
|
251044
251008
|
id: "deepseek-ai/Janus-Pro-7B",
|
|
251045
251009
|
label: "Janus-Pro-7B",
|
|
@@ -251193,13 +251157,12 @@ var init_image_generate = __esm({
|
|
|
251193
251157
|
}
|
|
251194
251158
|
];
|
|
251195
251159
|
IMAGE_GENERATION_QUALITY_LADDER = [
|
|
251196
|
-
|
|
251197
|
-
|
|
251160
|
+
SECONDARY_FLUX_DEV_MODEL,
|
|
251161
|
+
SECONDARY_FLUX_DEV_MIRROR_MODEL,
|
|
251162
|
+
SECONDARY_FLUX_DEV_COMFY_MODEL,
|
|
251198
251163
|
DEFAULT_OLLAMA_IMAGE_MODEL,
|
|
251199
|
-
"black-forest-labs/FLUX.1-schnell",
|
|
251200
|
-
"stabilityai/stable-diffusion-3.5-large-turbo",
|
|
251201
251164
|
"Tongyi-MAI/Z-Image-Turbo",
|
|
251202
|
-
|
|
251165
|
+
SECONDARY_FLUX2_MODEL,
|
|
251203
251166
|
DEFAULT_DIFFUSERS_IMAGE_MODEL,
|
|
251204
251167
|
"Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers",
|
|
251205
251168
|
"SimianLuo/LCM_Dreamshaper_v7",
|
|
@@ -597213,6 +597176,7 @@ function buildTelegramCreativeTools(repoRoot, chatId, backendUrl, imageDefaults
|
|
|
597213
597176
|
ensureManifest(root);
|
|
597214
597177
|
return [
|
|
597215
597178
|
scopedTool(new FileWriteTool(root), root, "create"),
|
|
597179
|
+
scopedTool(new FileEditTool(root), root, "edit"),
|
|
597216
597180
|
scopedTool(new StructuredFileTool(root), root, "create"),
|
|
597217
597181
|
scopedTool(new ImageGenerateTool(root, backendUrl, imageDefaults), root, "generate"),
|
|
597218
597182
|
scopedTool(new AudioGenerateTool(root, audioDefaults), root, "generate"),
|
|
@@ -597279,6 +597243,7 @@ function scopedTool(base3, root, mode) {
|
|
|
597279
597243
|
}
|
|
597280
597244
|
}
|
|
597281
597245
|
const pathKey = PATH_KEYS.find((key) => typeof next[key] === "string" && String(next[key]).trim());
|
|
597246
|
+
let restoredEditPath = null;
|
|
597282
597247
|
if (pathKey) {
|
|
597283
597248
|
const guarded = guardPath(rootAbs, String(next[pathKey]));
|
|
597284
597249
|
if (!guarded.ok) return denied(guarded.error);
|
|
@@ -597289,6 +597254,14 @@ function scopedTool(base3, root, mode) {
|
|
|
597289
597254
|
if (mode === "edit" && !manifestHas(rootAbs, guarded.path.rel)) {
|
|
597290
597255
|
return denied(`Public Telegram creative tools can only edit files created in this chat workspace: ${guarded.path.rel}`);
|
|
597291
597256
|
}
|
|
597257
|
+
if (mode === "edit" && !existsSync104(guarded.path.abs)) {
|
|
597258
|
+
const materialized = materializeTelegramCreativeArtifactForSend(rootAbs, guarded.path.rel);
|
|
597259
|
+
if (!materialized.ok) return denied(materialized.error);
|
|
597260
|
+
mkdirSync59(dirname33(guarded.path.abs), { recursive: true });
|
|
597261
|
+
writeFileSync55(guarded.path.abs, readFileSync85(materialized.path));
|
|
597262
|
+
materialized.cleanup?.();
|
|
597263
|
+
restoredEditPath = guarded.path.abs;
|
|
597264
|
+
}
|
|
597292
597265
|
if (mode === "create" && existsSync104(guarded.path.abs) && !manifestHas(rootAbs, guarded.path.rel)) {
|
|
597293
597266
|
return denied(`Refusing to overwrite a file that is not owned by this chat workspace manifest: ${guarded.path.rel}`);
|
|
597294
597267
|
}
|
|
@@ -597297,9 +597270,14 @@ function scopedTool(base3, root, mode) {
|
|
|
597297
597270
|
return denied(`${base3.name} requires a path inside the public creative workspace.`);
|
|
597298
597271
|
}
|
|
597299
597272
|
const result = await base3.execute(next);
|
|
597300
|
-
if (result.success && mode === "create" && pathKey) {
|
|
597273
|
+
if (result.success && (mode === "create" || mode === "edit") && pathKey) {
|
|
597301
597274
|
const guarded = guardPath(rootAbs, String(args[pathKey]));
|
|
597302
597275
|
if (guarded.ok) rememberCreated(rootAbs, guarded.path.abs);
|
|
597276
|
+
} else if (restoredEditPath) {
|
|
597277
|
+
try {
|
|
597278
|
+
unlinkSync19(restoredEditPath);
|
|
597279
|
+
} catch {
|
|
597280
|
+
}
|
|
597303
597281
|
}
|
|
597304
597282
|
if (result.success) {
|
|
597305
597283
|
for (const path11 of collectGeneratedArtifactPathsFromText(result.output, rootAbs)) {
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.23",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omnius",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.23",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
package/package.json
CHANGED