mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-16 18:02:58 +08:00
support missing node installer for ComfyUI-Workflow-Component
This commit is contained in:
parent
ea08191fa8
commit
74c3f81094
@ -16,7 +16,7 @@ sys.path.append('../..')
|
||||
from torchvision.datasets.utils import download_url
|
||||
|
||||
# ensure .js
|
||||
print("### Loading: ComfyUI-Manager (V0.7.2)")
|
||||
print("### Loading: ComfyUI-Manager (V0.8)")
|
||||
|
||||
comfy_path = os.path.dirname(folder_paths.__file__)
|
||||
custom_nodes_path = os.path.join(comfy_path, 'custom_nodes')
|
||||
|
||||
@ -16,6 +16,22 @@ async function getCustomnodeMappings() {
|
||||
return data;
|
||||
}
|
||||
|
||||
async function getUnresolvedNodesInComponent() {
|
||||
try {
|
||||
var mode = "url";
|
||||
if(ManagerMenuDialog.instance.local_mode_checkbox.checked)
|
||||
mode = "local";
|
||||
|
||||
const response = await fetch(`/component/get_unresolved`);
|
||||
|
||||
const data = await response.json();
|
||||
return data.nodes;
|
||||
}
|
||||
catch {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
async function getCustomNodes() {
|
||||
var mode = "url";
|
||||
if(ManagerMenuDialog.instance.local_mode_checkbox.checked)
|
||||
@ -243,6 +259,14 @@ class CustomNodesInstaller extends ComfyDialog {
|
||||
}
|
||||
}
|
||||
|
||||
let unresolved_nodes = await getUnresolvedNodesInComponent();
|
||||
for (let i in unresolved_nodes) {
|
||||
let node_type = unresolved_nodes[i];
|
||||
const url = name_to_url[node_type];
|
||||
if(url)
|
||||
missing_nodes.add(url);
|
||||
}
|
||||
|
||||
return data.filter(node => node.files.some(file => missing_nodes.has(file)));
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user