mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-05 15:40:10 +00:00
Show workflow templates from custom nodes (#2032)
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user