Commit Graph
130 Commits
Author SHA1 Message Date
Vito Sansevero 49fdc9642e Merge remote-tracking branch 'origin/main' into feat/model-downloader-tokens
# Conflicts:
#	CHANGELOG.md
2026-11-07 04:14:53 -08:00
Vito Sansevero da7a1f9a17 fix(model_downloader): send tokens over https only
With server tokens attached automatically, an http:// Civitai or Hugging
Face link in a shared workflow would have sent the token in cleartext.
Both downloaders now fetch those links over https, and redirects drop
the Authorization header on any hop that is not https.
2026-11-07 04:11:37 -08:00
Vito Sansevero 76a82d11e7 feat(model_downloader): server-side tokens and civitai.red/green links
A token typed on the node is saved inside the workflow, so sharing a
workflow shared the token. Civitai and Hugging Face now use the server's
token when api_token is empty: CIVITAI_API_KEY (or CIVITAI_API_TOKEN,
CIVITAI_TOKEN) and HF_TOKEN (or HUGGING_FACE_HUB_TOKEN, or the token
`hf auth login` saved). Each token goes only to its own site; custom URLs
only ever get a typed token.

Civitai now serves models on civitai.green and civitai.red as well as
civitai.com. Links from all three are detected, and downloads go through
civitai.com. A Civitai download with a filename that already exists
returns before any API call, so a workflow can keep its downloaders and
stay offline once the files are there.
2026-11-07 04:09:20 -08:00
Vito Sansevero 508eefddfd test(local_image_loader): cover the folder output in the browser suite
The test host unpacked two values from load_media, and the gallery
test expected no stored selection although the gallery now stores the
folder it shows. Return and assert the folder instead.
2026-11-07 04:06:25 -08:00
Vito Sansevero 9be3cc3397 feat(local_image_loader): add a folder output for the browsed folder
The Local Image Loader can browse folders visually, but only output a
picked image. Add a third output, folder: the path of the folder the
gallery shows, or the picked image's folder until the user browses.
Browsing is enough, so a training dataset can be found by its thumbnails
and passed to a node that reads a whole folder.

The gallery stores the shown folder through set_node_selection (type
"folder"), which accepts only directories inside the allowed roots;
load_media checks the stored folder against the roots again.
2026-11-07 03:54:23 -08:00
Vito Sansevero 4fdbc727cf Merge main (Custom Colors Nodes 2.0 fix) into chore/release-1.3.1 2026-11-01 03:24:59 -08:00
Vito Sansevero 38ae722659 fix(custom_colors): flag the Custom Colors entry as a submenu for Nodes 2.0
- The Nodes 2.0 context menu converts litegraph items itself and only
  renders submenu.options for entries flagged has_submenu, so the
  "Custom Colors" entry was an inert label there; litegraph's own menu
  accepts either flag, so set both
- Add a real-host test that drives the actual right-click menu in both
  renderers through to the color dialog; the existing test invoked the
  callbacks directly and bypassed the converter
- Assert has_submenu on the node and group entries in the browser suite
2026-10-31 22:19:26 -07:00
Vito Sansevero 037ff39a3b chore(release): 1.3.1 with a one-line startup banner
- Collapse the console banner to a single line with the version and the
  tool count instead of one `Loaded:` line per node, matching
  ComfyUI-PromptManager
- Keep the banner ASCII so a legacy Windows console cannot abort the load
- Update the console encoding test to assert the summary line
- Ship the Krea 2 resolution family already on main
- Bump pyproject.toml to 1.3.1 and date the changelog section
2026-10-31 21:12:54 -07:00
Vito Sansevero 4532038c8a feat(model_resolution_picker): add a Krea 2 family
Krea 2 uses the Wan 2.1 latent (8x VAE) with patch 2, so sizes sit on a
16 px grid. Tiers 1.0 / 2.0 / 4.0 MP cover the model card's 1024x1024 and
2048x2048; Big Love KreaEdit3's 1024x1536 is listed under 2:3.
2026-10-28 07:12:29 -07:00
Vito Sansevero 0cd25a1073 test(model_resolution_picker): cover an override step off the latent grid being ignored whole
- A step of 3 in a user override must drop the whole file with the panel warning and leave the shipped SDXL step at 64.
2026-10-27 15:01:55 -07:00
Vito Sansevero ef5c9bb85a fix(model_resolution_picker): require family steps to be multiples of 8
- An override family could declare a step such as 3; sizes rounded to it
  are not divisible by 8, so create_empty_latent_batch raised ValueError
  at execution instead of producing a latent (Codex review on PR #108).
- validate_table now rejects a step that is not a multiple of 8 with a
  message naming the latent grid; the shipped steps (16, 32, 64) already
  comply, and the schema docs state the rule.
2026-10-27 15:01:19 -07:00
Vito Sansevero dfe11928b9 fix(model_resolution_picker): fit the node height to the panel content
- New nodes started at a fixed 340×600, so one-entry size lists left a
  large empty area between the list and the Swap button.
- The panel now reports its measured content height as both the minimum
  and maximum DOM-widget height, and the extension sets the node height to
  the host's computeSize() after every render, keeping the width.
- Hidden or detached panels are not measured, the first measurement is
  retried for a few frames, and a ResizeObserver on the panel children
  refits when the stylesheet arrives after the first render (the coverage
  run exposed that race; a held-stylesheet regression test pins it).
- Workflows load at their saved width and are re-fitted on load; the spec
  and docs describe the new sizing rule.
2026-10-27 14:07:47 -07:00
Vito Sansevero 959c6b9e9f style(model_resolution_picker): format the override tests 2026-10-27 12:50:43 -07:00
Vito Sansevero b9ca7976aa fix(model_resolution_picker): map four-value legacy workflows on load
- workflows saved before the resolution widget load shifted by one slot
- onConfigure now maps exactly four widgets_values onto model, width,
  height and batch_size and resets resolution to custom
- the host test stub applies widgets_values and calls onConfigure like LiteGraph
2026-10-27 12:50:16 -07:00
Vito Sansevero 729652facf fix(model_resolution_picker): include file size in the override cache key
- a replacement with the same mtime but different size was served stale
2026-10-27 12:49:17 -07:00
Vito Sansevero 47e95f95c3 fix(model_resolution_picker): bound sizes to the width/height widget limits
- table validation accepts sides 64..8192, matching the widget min/max
- parse_size_label (Python and JS) caps digits and rejects out-of-range
  sizes so create() falls back to width/height instead of overflowing
2026-10-27 12:49:10 -07:00
Vito Sansevero 623915fd7d fix(model_resolution_picker): feed override families into the model combo
- family_labels() and the combo default now read the merged table, so an
  appended family is selectable and a removed one is not offered
- an alias used as the override default is normalised to its label
- the frontend rebuilds the model options from the payload and keeps a
  saved family that is no longer listed so old workflows still show it
2026-10-27 12:48:42 -07:00
Vito Sansevero d55bc72c34 fix(model_resolution_picker): reset a stale resolution label and use binary megapixels
- Set resolution to custom whenever the panel has no selection (wired,
  failed, non-finite or loading) so a stale label cannot override width/height.
- Compute label megapixels with 1 MP = 1,048,576 px, matching the panel
  header, with half-up rounding so Python and JS labels agree on ties.
2026-10-27 12:31:09 -07:00
Vito Sansevero eaf03874b3 feat(model_resolution_picker): add a resolution dropdown synced with the chip grid
- Add a native resolution COMBO (shipped sizes only) so a size can be picked
  and saved in the workflow without the panel; custom or unparseable labels
  fall back to width/height on both sides.
- Mirror the dropdown with the chips: options follow the active chip, the
  value tracks the current size, and picking a label writes width/height.
- Draw a decorative ratio shape on each ratio chip and show the first
  families warning in the status line.
2026-10-27 12:22:16 -07:00
Vito Sansevero 211d69e04e fix(model_resolution_picker): ignore an override that nests too deeply to parse
- catch RecursionError alongside ValueError when loading, merging and validating
- add tests for deep nesting, remove vs families, and a default naming a removed family
2026-10-27 12:03:04 -07:00
Vito Sansevero cd6d0d9650 feat(model_resolution_picker): merge a user override file into the family table
- add override.py: override_path, merge_override, mtime-cached current_table
- resolve_family and families_payload consult the merged table and expose warnings
- an invalid override is ignored whole with a logged warning
2026-10-27 12:01:20 -07:00
Vito Sansevero 469d3740b8 fix(model_resolution_picker): stop huge integers from overflowing the table validator
- treat ints as finite instead of calling math.isfinite on them
- bound step (4096), megapixels (64) and side length (65536) with normal problem messages
- cover step, megapixels, default and size values of 10**400
2026-10-27 11:58:11 -07:00
Vito Sansevero cb3027717e fix(model_resolution_picker): keep the table validator from raising on malformed data
- check default, labels and aliases are strings before set membership
- reject non-finite step and megapixels via a shared _is_step helper
- cover unhashable and Infinity/NaN inputs in the garbage test
2026-10-27 11:56:54 -07:00
Vito Sansevero db64038b25 refactor(model_resolution_picker): move the family table to families.json with a validator
- ship the table as families.json with per-family notes from the old source comments
- add table.py: load_table, pure validate_table and build_families
- families.py loads and validates at import, raising RuntimeError on problems
- include *.json as package data
2026-10-27 11:54:19 -07:00
Vito Sansevero 38f820c8f5 fix(model_resolution_picker): accept renamed labels, dedupe chip sizes, apply early model change
- VALIDATE_INPUTS lets unknown family labels reach create()
- no size is listed under two chips; SD 1.5 3:4 gets true 3:4 sizes
- model change before the families payload loads is applied on load
- custom ratio: clear error on chip click, cap sides at 8192, accept X
- real-host assertions for model change and wired-in state
2026-10-27 11:02:45 -07:00
Vito Sansevero c8a1823569 test(model_resolution_picker): cover both renderers and workflow round-trip on the pinned host
- extract the real-host beforeEach into tests/comfyui/host-setup.mjs and proxy /kikotools/model_resolution/ to the fixture
- add the picker spec: renderer switching, shared swap, themes, workflow reload, scope abort
- add light and dark screenshots for the docs
2026-10-27 10:36:01 -07:00
Vito Sansevero 655049eec8 feat(model_resolution_picker): model change, custom ratio, wired-in and failure handling
- render the static chip list in every state; payload only drives enabled/active
- re-derive size on model change via sizeOnModelChange
- validate custom ratio, keep last valid list, ignore repeated commits
- add swap, model change, custom ratio and route failure browser tests
- add coverage floors for the three picker files
2026-10-27 10:31:15 -07:00
Vito Sansevero c62f363831 fix(model_resolution_picker): keep focus, pressed hover and wired-in state current
- restore keyboard focus to the equivalent button after each render
- keep the accent background when hovering a pressed chip or size
- refresh the panel when input links change
- treat a size listed in the clicked chip as a no-op
2026-10-27 10:23:32 -07:00
Vito Sansevero 97a4c7b78b feat(model_resolution_picker): add the chip grid panel and extension
- add resolution picker view with chip grid, size list and custom ratio input
- add extension that projects native widgets and writes sizes via callbacks
- add browser tests for rendering, theming, idempotent mount and disposal
2026-10-27 10:20:02 -07:00
Vito Sansevero bc4a3f44f9 feat(ui): add resolution picker derivation module
- add pure ratio parsing, chip derivation and size generation helpers
- round sizes to the family step with a 64 pixel floor
2026-10-27 10:16:02 -07:00
Vito Sansevero 408fc5e2f8 feat(ui): let swapDimensions work on nodes without a preset widget
- Treat a missing preset widget like preset value 'custom' in swapDimensions
- Keep every preset access behind the custom check
- Add a test that swaps width and height directly on a preset-less node
2026-10-27 10:14:24 -07:00
Vito Sansevero 83ed5ae42d feat(model_resolution_picker): add node, families route and registration
- add ModelResolutionPickerNode rounding to the family step
- serve GET /kikotools/model_resolution/families
- register the node in NODE_CLASS_MAPPINGS
2026-10-27 10:13:07 -07:00
Vito Sansevero f916636c6a feat(model_resolution_picker): add the model family resolution table
- add CHIPS, MIRROR, Family and the FAMILIES literal table
- add family_labels, resolve_family and families_payload helpers
- cover step, ratio, mirror and sort invariants with tests
2026-10-27 10:09:50 -07:00
Vito Sansevero 2f497cec5a feat(model_resolution_picker): add step rounding and size generation
- add round_to_step, generate_size and ratio_label pure helpers
- cover nearest-step rounding, minimum clamp, size math and aliases
2026-10-27 10:06:50 -07:00
Vito Sansevero 297f2b1863 fix: mark EmptyLatentBatch latents with their 8x spatial ratio
ComfyUI resizes an empty latent to the model's latent format only when the
latent carries downscale_ratio_spacial, as core EmptyLatentImage sets it.
Without it, models with 16x VAEs (Flux.2, Klein, MOSS-Image, Qwen-Image 2.1)
sampled at twice the requested width and height.
2026-10-26 20:07:03 -07:00
Vito Sansevero 1820fb19ea test(ci): enforce reviewed CPU dependency versions 2026-10-16 17:29:08 -07:00
Vito Sansevero 1721778cb5 test(ci): automate pinned ComfyUI checks and prepare 1.2.0 2026-10-16 17:23:11 -07:00
Vito Sansevero 8dc81364a0 test(follow_execution): verify native menus in both renderers 2026-10-16 16:58:34 -07:00
Vito Sansevero 957ca3c142 fix(follow_execution): honor live settings and stabilize subscriptions 2026-10-16 16:50:58 -07:00
Vito 1a7e0dfcd7 Merge branch 'main' into chore/deprecate-gemini 2026-10-16 16:36:20 -07:00
Vito Sansevero ca65cc7961 test(loader): await initial gallery before keyboard controls 2026-10-16 16:25:33 -07:00
Vito Sansevero 6adba639bb feat(custom_colors): adopt shared ComfyAssets picker 2026-10-16 16:17:28 -07:00
Vito Sansevero 1e86b73168 chore(gemini): soft-deprecate legacy prompt node 2026-10-16 15:44:31 -07:00
Vito Sansevero f8ce4cb982 fix(autocomplete): address review findings and WebKit readiness 2026-10-16 15:31:46 -07:00
Vito Sansevero 42b6009f1b feat(autocomplete): restore tag imports and advanced settings 2026-10-16 15:11:56 -07:00
Vito Sansevero b4bd8b98b1 feat(ui): unify Embedding Autocomplete controls and suggestions 2026-10-16 13:49:11 -07:00
Vito Sansevero b0c0d53676 feat(ui): unify Display Text and Display Any output views 2026-10-16 13:20:28 -07:00
Vito Sansevero b5694ecfe5 feat(ui): migrate Node Dimensions to shared dialog controls 2026-10-16 13:00:36 -07:00
Vito Sansevero 26557a99b6 feat(ui): unify dimension swap controls for both nodes 2026-10-16 12:35:23 -07:00
Vito Sansevero 0c47dc6085 feat(ui): migrate Workflow Timer to shared controls 2026-10-16 12:18:02 -07:00