Commit Graph
94 Commits
Author SHA1 Message Date
Chris 7bc121055d still working on that markdown 2026-07-14 13:10:10 +02:00
Chris c41ae3f910 update the md again 2026-07-14 13:07:17 +02:00
Chris 67b35d28d4 updated readme again 2026-07-14 13:00:01 +02:00
Chris 9165fb72f1 updated readme 2026-07-14 12:58:42 +02:00
Chris 01d0bbc154 bump version pack 2026-07-14 11:23:51 +02:00
Little-God1983 050db4c7da Merge pull request #10 from Little-God1983/feature/lora-loader-detection
feat: detect rgthree Power Lora Loader + Lora Loader Stack
2026-07-12 20:16:14 +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
Little-God1983 b7c7875a8b Merge pull request #9 from Little-God1983/feature/save-civitai-metadata
Add Save Metadata (Civitai) nodes (Basic + Advanced)
2026-07-12 16:02:04 +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 a7f89028ac docs: document Save Metadata (Civitai) nodes; bump to 1.5.0
Adds a README section for the two new output nodes (Basic + Advanced)
covering the A1111 parameters chunk, static tracer with Prompt Batch
index resolution, Advanced override sockets, Test-detection button,
save_workflow toggle, and AutoV2 hashing/caching. Version bumped to
1.5.0 (new minor on top of the 1.4.0 branch base).
2026-07-12 12:14:32 +02:00
Chris e8c77a6817 fix: harden Test preview batch-slot handling and numeric escaping 2026-07-12 12:11:10 +02:00
Chris 86d6279b71 fix: reflect Advanced override sockets in Test-detection preview 2026-07-12 12:04:29 +02:00
Chris 707effa8a8 feat: Test-detection button + JS tracer mirror for Save Metadata nodes 2026-07-12 11:56:08 +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
Chris a1517d47af test: add pytest bootstrap and ignore hash cache 2026-07-12 11:00:25 +02:00
ChrisandClaude Opus 4.8 dc9b008e89 docs: implementation plan for Save Metadata (Civitai) nodes
TDD, 12 bite-sized tasks: comfy-free engine (tracer, A1111 formatter,
AutoV2 hashing+cache, PNG builder), the two io.ComfyNode classes, and
the JS Test-detection mirror.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-12 10:56:21 +02:00
ChrisandClaude Opus 4.8 5cf846513c docs: design for Save Metadata (Civitai) nodes
Two output nodes that write the A1111 `parameters` PNG chunk Civitai
reads, capturing the real prompt used per run (incl. the Prompt Batch
line at its run index) instead of the ComfyUI workflow. Full A1111
parity: LoRA tags + AutoV2 hashes so Civitai auto-links resources.
Basic auto-traces the graph; Advanced adds override sockets.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-12 10:42:34 +02:00
Chris 764ccff671 new version bump 2026-07-12 10:17:14 +02:00
Chris 85959a9291 bugfix to main, great 2026-07-11 18:42:30 +02:00
ChrisandClaude Opus 4.8 79e23e3a7c docs: document Prompt Batch JSON structure in README
Explain the prompt-list JSON: array of {positive (required), negative
(optional)} entries, plus the bare-string / prompt-alias / {"prompts":[]}
convenience forms and empty-positive handling.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-11 16:26:32 +02:00
ChrisandClaude Opus 4.8 c65247c6b9 docs: correct attribution in README credits
Only the Ideogram 4 Prompt Builder + editor derive from KJNodes; the
Style Wizard, Resolution Selector, and Prompt Batch are original
AIKnowledge2Go work. The pack stays GPL-3.0 because it bundles Kijai's
GPL-3.0 code.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-11 16:25:27 +02:00
Little-God1983 bc8cf0ee2f Merge pull request #8 from Little-God1983/feature/prompt-V3
Feature/prompt v3
2026-07-11 16:01:13 +02:00
ChrisandClaude Opus 4.8 dc03ff6008 docs: add Batch.png screenshot to Prompt Batch README section
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-11 16:00:33 +02:00
ChrisandClaude Opus 4.8 6e88043f6b docs: document AI2Go Prompt Batch node in README
Add a Nodes section covering the redesigned Prompt Batch node: the
positive/negative row editor, Read-from-JSON import via the json_in
socket, Add/Clear, the index output for filenames, and the
reset-index / delete-empty-prompts toggles.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-11 15:34:24 +02:00
Chris 9123c938f9 new feature 2026-07-11 15:26:07 +02:00
Little-God1983 68aada23ee Merge pull request #7 from Little-God1983/feature/batch-prompt-V2
upload-V2
2026-07-11 14:35:04 +02:00
Chris b686fe40d3 upload-V2 2026-07-11 12:55:35 +02:00
Little-God1983 88e60459c4 Merge pull request #6 from Little-God1983/feature/prompt-batch
prompt batch
2026-07-11 11:08:43 +02:00
Chris ea99cd873a prompt batch 2026-07-11 11:07:02 +02:00
Little-God1983 e87d9d9d96 Merge pull request #5 from Little-God1983/feature/new-node-batch-prompt-generate
added new folder to ignore
2026-07-11 10:32:35 +02:00
Chris 759f0b9484 added new folder to ignore 2026-07-11 10:32:03 +02:00
Chris 60e160f115 added resolution selector 2026-06-29 21:51:12 +02:00
Little-God1983 a77073c24b Merge pull request #4 from Little-God1983/feature/resolution-selector
Feature/resolution selector
2026-06-29 21:50:10 +02:00
ChrisandClaude Opus 4.8 9352b23986 fix(resolution selector): aspect-preserving clamp + read-only readout with max warning
- megapixel/auto now preserve the aspect ratio when clamped to the profile's per-side cap (16:9 at max -> 2048x1152, not 2048x2048); aspect is prioritized over hitting the exact target size.

- Replaced the Apply button with a read-only readout (resulting WxH + MP); edits and new connections auto-push the dims to a connected Prompt Builder canvas.

- Added a profile-aware warning shown when the request is clamped to the profile's maximum (e.g. Ideogram 4 max 2048x2048).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 21:43:29 +02:00
ChrisandClaude Opus 4.8 5eea33938f feat: standalone AI2Go Resolution Selector node; revert prompt builder to KJ-original resolution
Adds AI2GoResolutionSelector: a profile-aware (Ideogram 4 = x16, 256-2048) resolution node with raw/auto/megapixel modes, INT width/height outputs for any workflow, and an Apply button that pushes dims into a connected node's width/height widgets (refreshing the Ideogram 4 Prompt Builder canvas via the same write pattern the Style Wizard uses). Dims also flow on graph execution.

Reverts the prompt builder's width/height to KJ-original (removes the embedded resolution_mode/aspect_ratio/megapixels widgets) so its node/JSON stays copy-paste compatible with the upstream KJNodes Ideogram 4 node.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 21:19:20 +02:00
ChrisandClaude Opus 4.8 4881323373 fix: heal legacy resolution-widget values + name-keyed restore
Old workflows/images saved before the resolution selector (or by a build with a different widget order) could land non-numeric junk in resolution_mode/aspect_ratio/megapixels via ComfyUI's positional widgets_values restore (shown as NaN). onConfigure now restores them from a name-keyed blob when present and coerces any remaining junk to sane defaults.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 20:38:28 +02:00
Chris 4df28b97e0 fix: update resolution bug 2026-06-29 20:28:19 +02:00
Chris e8d9804ec0 res-selector 2026-06-29 19:06:36 +02:00
Chris d60c2e4e88 Merge branch 'main' of https://github.com/Little-God1983/ComfyUI-AI2Go-Utils 2026-06-29 15:14:15 +02:00
Chris baa0c46b33 added-thumbnail-support-for-templates 2026-06-29 15:13:46 +02:00
Little-God1983 467e02d4e0 Merge pull request #3 from Little-God1983/feature/templates
Feature/templates
2026-06-29 15:12:35 +02:00