"All models" now lists, from the scan summary, how many models a scan looks up, keeps, leaves for "look up again" and leaves out, following the offline and fetch-again switches. "Only ones I pick" names the picks with their size and says when found ones would only be read again. The picker (ui_scan_picker.js, GET /anomalous/scan_pickable) lists the .safetensors files a scan reads with the scan page's states, folder, base model and size, as a list or covers, narrowed by folder, state, search and picked-only; "pick these" picks what is shown, shift-click a run. Picks go to the scan as targets. The old inline-styled selector and its batch_select route are gone; setWidgetValuePath keeps its own file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
24 lines
818 B
JavaScript
24 lines
818 B
JavaScript
/**
|
|
* Puts a model path into a loader node's model widget: the drop-down's own spelling of it when
|
|
* the list has it (either slash), else the path as given.
|
|
*/
|
|
|
|
export function setWidgetValuePath(node, relPath) {
|
|
if (!node.widgets || node.widgets.length === 0) return;
|
|
const w = node.widgets.find(wg => wg.type === 'combo');
|
|
const targetWidget = w || node.widgets[0];
|
|
if (!targetWidget) return;
|
|
|
|
if (targetWidget.options && targetWidget.options.values) {
|
|
const normalizedTarget = relPath.replace(/\\/g, '/');
|
|
const match = targetWidget.options.values.find(v => {
|
|
return String(v).replace(/\\/g, '/') === normalizedTarget;
|
|
});
|
|
if (match) {
|
|
targetWidget.value = match;
|
|
return;
|
|
}
|
|
}
|
|
targetWidget.value = relPath;
|
|
}
|