Show workflow templates from custom nodes (#2032)

This commit is contained in:
Zoltán Dócs
2024-12-30 04:26:03 +01:00
committed by GitHub
parent 92a5a8057f
commit 5218024395
5 changed files with 237 additions and 59 deletions

View File

@@ -397,6 +397,17 @@ export class ComfyApi extends EventTarget {
return await resp.json()
}
/**
* Gets the available workflow templates from custom nodes.
* @returns A map of custom_node names and associated template workflow names.
*/
async getWorkflowTemplates(): Promise<{
[customNodesName: string]: string[]
}> {
const res = await this.fetchApi('/workflow_templates')
return await res.json()
}
/**
* Gets a list of embedding names
*/