nanoodle 0.4.0 → 0.5.0
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/README.md +2 -6
- package/package.json +1 -1
- package/src/nodes.mjs +9 -0
package/README.md
CHANGED
|
@@ -46,10 +46,6 @@ npm install nanoodle # library + CLI
|
|
|
46
46
|
npx nanoodle --help # or run the CLI without installing
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
Latest on npm is **0.2.0**; accountless `--pay` (x402) and the local-media
|
|
50
|
-
nodes below need 0.4 — until it ships, install from this repo
|
|
51
|
-
(`npm install github:nanoodlecom/nanoodle-js`).
|
|
52
|
-
|
|
53
49
|
## Quickstart (library)
|
|
54
50
|
|
|
55
51
|
```js
|
|
@@ -164,7 +160,7 @@ all fail **before** anything is spent.
|
|
|
164
160
|
| local media† | resize, vframes, combine, soundtrack, trim, extractaudio |
|
|
165
161
|
| NanoGPT | llm (incl. vision + audio input), image, draw, edit, inpaint*, vision, tvideo, ivideo, vedit, lipsync, music, remix, tts, transcribe |
|
|
166
162
|
|
|
167
|
-
† **local media**
|
|
163
|
+
† **local media** prefers a pure-JS path that matches the browser (lossless mp4 remux, PCM-WAV trim, PNG resize). **ffmpeg** on `PATH` is the fallback for everything else (soft dependency — not an npm package); clear error if it’s required and missing.
|
|
168
164
|
|
|
169
165
|
\* **inpaint:** the mask is composited onto black at the source image’s pixel
|
|
170
166
|
size before send (same as the browser app) — white = repaint, black = keep.
|
|
@@ -202,7 +198,7 @@ A price of `0` means known-included (subscription), not unknown. `inspect`
|
|
|
202
198
|
and loading/validating workflows never call the API. No telemetry, no
|
|
203
199
|
analytics; the API key is never logged.
|
|
204
200
|
|
|
205
|
-
## No account at all: pay per run in Nano (x402)
|
|
201
|
+
## No account at all: pay per run in Nano (x402)
|
|
206
202
|
|
|
207
203
|
NanoGPT supports [x402](https://nano-gpt.com) accountless payments: call the
|
|
208
204
|
API with no key, get an HTTP 402 invoice, settle it in Nano (XNO — instant,
|
package/package.json
CHANGED
package/src/nodes.mjs
CHANGED
|
@@ -188,6 +188,11 @@ function isValidCustomAir(air) {
|
|
|
188
188
|
return /^(civitai:\d+@\d+|persona:\d+@\d+|runware:[^\s@]+@[^\s@]+)$/i.test(air);
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
+
// FLUX-family platform AIRs are guidance-distilled (CFG=1) — a negative prompt has no effect, so
|
|
192
|
+
// omit it. Ids: 100/101 FLUX.1, 103/104 depth/canny, 106 kontext, 107 krea, 111 SRPO, 160 Flex.1,
|
|
193
|
+
// 400 FLUX.2/klein. Mirrors the app.
|
|
194
|
+
function airTakesNegative(air) { return !/^runware:(100|101|103|104|106|107|111|160|400)@/i.test(String(air || "")); }
|
|
195
|
+
|
|
191
196
|
/** Per-call image extras: LoRA params + fixed seed (when numeric) + custom-civitai AIR. */
|
|
192
197
|
function imgExtra(n) {
|
|
193
198
|
const e = loraParams(n);
|
|
@@ -200,6 +205,10 @@ function imgExtra(n) {
|
|
|
200
205
|
throw new NanoodleError("AIR must look like civitai:MODEL@VERSION, runware:id@rev, or persona:MODEL@VERSION");
|
|
201
206
|
}
|
|
202
207
|
e.customCivitaiAir = air;
|
|
208
|
+
// snake_case only — negativePrompt (camelCase) is silently dropped by the API; same-seed
|
|
209
|
+
// probe on persona:376130@2456367 confirmed negative_prompt reaches the sampler (2026-07-18)
|
|
210
|
+
const np = String(n.fields.negativePrompt || "").trim();
|
|
211
|
+
if (np && airTakesNegative(air)) e.negative_prompt = np;
|
|
203
212
|
}
|
|
204
213
|
return e;
|
|
205
214
|
}
|