Commit Graph
3 Commits
Author SHA1 Message Date
Will Miao 1276673e0e fix(loaders): migrate backslash values in subgraphs and clear the error flag (#1149)
The follow-up report found three gaps in the value migration:

* applyToAllNodes only walked the root graph, so loader nodes inside
  subgraphs kept their backslash values. It now recurses through
  node.subgraph (Subgraph extends LGraph, so .nodes works at every level).
  Promoted combo widgets share the interior widget's store-backed value,
  so migrating the interior widget fixes the subgraph boundary too.
* Pasted nodes never hit the graph-level configure hook. A per-node
  onConfigure wrapper now runs the same sanitize + migrate pass after
  widget values restore.
* The corrected value kept its stale "value not in list" flag. The
  migration now fires the node's onWidgetChanged hook, which the
  frontend's error-clearing chain uses to drop value_not_in_list errors.
2026-10-17 17:12:41 +08:00
Will Miao be0133a699 fix(loaders): accept backslash-spelled model names from old workflows (#1149)
The forward-slash paths fix changed the checkpoint/unet combo lists on
Windows from "dir\model.safetensors" to "dir/model.safetensors", so
workflows saved before it loaded with a value no option matches: the
front-end extension reset the widget to the first model, or ComfyUI
flagged it "value not in list" when the widget was wired.

Two layers:

* random_loader_control.js migrates the widget value to its
  separator-normalized form when that form is a known model, before the
  reset-to-first fallback and before the wired early return.
* The loader nodes declare VALIDATE_INPUTS for the model name input,
  lifting ComfyUI's strict list check for it; the shared helper resolves
  separator-normalized names against the cache, so API-submitted or
  programmatic values validate too. get_checkpoint_info_absolute now
  normalizes backslashes explicitly instead of via os.sep, which was a
  no-op on Linux.
2026-10-17 10:19:53 +08:00
Will Miao e05046af10 fix(loaders): sanitize invalid control_after_generate values when loading old workflows
Old workflows (saved before the control_after_generate feature) carry a
shorter widgets_values array. The frontend's index-based widget restore
then shifts the old weight_dtype value into the hidden control widget
(leaving an invalid value like 'default') and silently resets
weight_dtype to its default. On graph load, hand the shifted value back
to weight_dtype when it still sits at its default, then reset the
control mode to 'fixed' so old workflows keep loading deterministically.
2026-08-25 08:30:17 +08:00