Commit Graph
27 Commits
Author SHA1 Message Date
Chris 29eae8df76 fix: tolerate undecodable audio tracks, skip decode when already at the forced rate 2026-08-14 19:15:53 +02:00
Chris 82c1eb37a8 feat: Multi Video Loader (simple + Advanced) nodes
Follows the pack's simple/Advanced batch-loader pattern (multi_image_loader,
multi_audio_loader): drop up to 8 video files onto the node, each gets its
own video_N/audio_N output (plus filename_N on Advanced). video_N is a lazy
VideoFromFile by default (decodes nothing); force_rate > 0 decodes and
retimes frames via resample_frame_indices while keeping real duration.
audio_N is decoded independently with PyAV so it stays available on the
cheap path, and is None (not an error) for clips with no audio track.
Disabled rows hold their socket position, matching the other loaders.

Registered in __init__.py; integration tests follow
tests/test_multi_audio_loader.py's shape (skipped outside a ComfyUI env).
2026-08-14 18:59:23 +02:00
Chris 768e9ce011 feat: force-rate frame resampling core (resample_frame_indices)
Adds a comfy-free helper that retimes a source frame sequence to a
target fps while preserving real duration (VideoHelperSuite-style
force_rate) — 0 means off, dropping/duplicating frames otherwise.
Needed by the upcoming Multi Video Loader nodes.
2026-08-14 18:59:14 +02:00
ChrisandClaude Fable 5 90af13f7a0 test: guard the all-rows-disabled case (count 0, all slots None, no raise)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 15:39:41 +02:00
Chris 19602fef52 feat: per-row on/off toggles with Toggle All; disabled rows hold their socket and output nothing 2026-08-14 15:31:12 +02:00
ChrisandClaude Fable 5 a5b21c8294 refactor: rename Batch loaders to Multi loaders, plain-word downscale modes
Batch already means one-item-per-queued-run in this pack (AI2GoPromptBatch);
these loaders emit everything in a single run, so Batch was misleading.
Renamed the four loader nodes/files/classes to Multi (AI2GoMultiImageLoader,
AI2GoMultiImageLoaderAdvanced, AI2GoMultiAudioLoader, AI2GoMultiAudioLoaderAdvanced),
and reworded DOWNSCALE_MODES from fit/crop/stretch to the plain-word
"keep aspect ratio"/"crop to square"/"stretch to square" (behavior unchanged).
Nothing published yet, so no back-compat aliases were added.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 10:42:25 +02:00
Chris 4f010abcfb fix: wrap all audio decode exceptions with filename; add tensor dtype/shape assertions 2026-08-12 21:41:17 +02:00
Chris 2d646d14d2 feat: batch audio loader nodes (simple + advanced) 2026-08-12 21:32:38 +02:00
Chris a3aa3cf221 feat: batch image loader nodes (simple + advanced) 2026-08-12 21:24:42 +02:00
Chris 7b0b3caa88 feat: batch loader core - shift-on-delete list op 2026-08-12 21:21:33 +02:00
Chris 9632f54b23 feat: batch loader core - fit/crop/stretch downscale geometry 2026-08-12 21:17:30 +02:00
Chris fd2e81b039 feat: batch loader core - files_json parsing 2026-08-12 21:13:43 +02:00
Chris a5c0e9aa22 bugfix-ideogram-prompt-profile 2026-07-15 23:41:04 +02:00
Chris 65f146bd45 fix: append new inputs for old-workflow compat; add MP/portrait tests; harden JS parseAR; README range 2026-07-15 21:09:31 +02:00
Chris 8087d933ce feat: comfy-free resolution core (default profile, snap multiple, orientation, named ratios) 2026-07-15 20:40:35 +02:00
ChrisandClaude Opus 4.8 e23137d1f9 feat: detect rgthree Power Lora Loader + Lora Loader Stack
The Save Metadata (Civitai) graph trace only recognized ComfyUI's stock
LoraLoader/LoraLoaderModelOnly, so LoRAs loaded via rgthree's multi-LoRA
nodes were silently missing from the written metadata and the preview.

- tracer.py: harvest LoRAs from "Power Lora Loader (rgthree)" (lora_N dicts)
  and "Lora Loader Stack (rgthree)" (flat lora_0N/strength_0N pairs), several
  per node, in load order. Skip disabled, empty ("None") and zero-strength
  slots to match what actually loads. Stock loaders still work.
- save_civitai_metadata.js: mirror the same detection in the live-graph
  Test-detection preview (kept in sync with the Python tracer).
- Preview warning now distinguishes positive/negative (may be resolved at run
  time by the AI2Go Prompt Batch node) from genuinely-unresolved fields.
- Tests for both rgthree loaders (multiple loras, ordering, skipped slots).
- README: document the supported LoRA loaders.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-12 20:07:08 +02:00
ChrisandClaude Opus 4.8 5380fb336d fix: model detection for diffusion models, %date% filenames, preview resize
Real-world testing feedback (PR #9):
- Detect models loaded via UNETLoader ("Load Diffusion Model", unet_name in
  the diffusion_models folder) + GGUF unet loaders, not just checkpoints;
  carry the folder so AutoV2 hashing looks in the right place. Fixes
  "model (?)" on Flux/SD3/Krea workflows. Mirrored in the JS Test button.
- Expand %date:FORMAT% filename tokens (frontend feature that doesn't reach a
  custom node's widget) before get_save_image_path, so e.g.
  "%date:yyyy-MM-dd%/Krea-Turbo" works. New comfy-free filenames module.
- Test-detection preview panel now reserves its natural height and grows the
  node to fit (measured, like the Prompt Batch editor) instead of overflowing.

Advanced node sockets kept as-is per user preference. +10 unit tests (39 passed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-12 17:51:50 +02:00
ChrisandClaude Opus 4.8 3773496d68 chore: tidy-ups from final review (dead logger, unused import, test header)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-12 12:24:32 +02:00
Chris adcb11a6f5 feat: Save Metadata (Civitai) Basic + Advanced nodes 2026-07-12 11:48:36 +02:00
ChrisandClaude Opus 4.8 834a1b97e2 feat: tracer model/LoRA chain resolution
Extends the static graph tracer to walk sampler.model backward through
LoraLoader/LoraLoaderModelOnly and pass-through nodes to the checkpoint
loader, populating TraceResult.model_name/.model_file/.loras in load order.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-12 11:44:36 +02:00
Chris 485c2dcb55 feat: tracer prompt resolution incl. Prompt Batch at run index 2026-07-12 11:40:14 +02:00
ChrisandClaude Opus 4.8 c9899d61dd feat: tracer sampler detection and field reading
Implements Task 6 — pure module for walking ComfyUI API prompt backward from
save node to detect sampler and read scalar fields (steps, cfg, seed, etc).
Provides TraceResult dataclass and trace() function with BFS backward search
and single-sampler fallback. Leaves Tasks 7 & 8 extension marker in place.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-12 11:35:37 +02:00
Chris 5e162eee45 feat: PNG metadata builder (parameters + optional workflow/prompt) 2026-07-12 11:32:43 +02:00
Chris aadc5ac4d8 feat: AutoV2 file hashing with persistent cache 2026-07-12 11:29:26 +02:00
ChrisandClaude Opus 4.8 485919da17 feat: A1111 parameters formatter
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-12 11:26:03 +02:00
ChrisandClaude Opus 4.8 dd4461f2c5 feat: ComfyUI->A1111 sampler-name mapping
Implement to_a1111_sampler function that maps ComfyUI (sampler_name, scheduler) pairs
to A1111/Civitai sampler labels. Includes 23 known sampler mappings with fallback to
readable label generation and scheduler-specific handling.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-12 11:22:50 +02:00
Chris dc914202e6 refactor: extract prompt batch parse/select into comfy-free core
Move _parse_prompts/_select/DEFAULT_PROMPTS_JSON out of nodes/prompt_batch.py
(which imports comfy_api) into a pure nodes/prompt_batch_core.py so the parsing
logic can be unit tested and reused by the upcoming Civitai metadata tracer
without a ComfyUI install. prompt_batch.py now imports the three names;
behavior is unchanged (select_prompt keeps all three of the original _select's
fallback logger.warning calls, so logging is identical too).

Also fix pytest collection: the repo root doubles as the ComfyUI extension
package (its own __init__.py does relative imports), which made pytest wrap
the repo root in a Package collector and fail importing it. Add
--confcutdir=tests/testpaths in pyproject.toml so `pytest tests/...` (and bare
`pytest`) work without needing a ComfyUI install.
2026-07-12 11:17:06 +02:00