Skip to content

Commit

Permalink
v0.2.7 with update support for modern comfyui
Browse files Browse the repository at this point in the history
  • Loading branch information
karurochari committed Aug 22, 2024
1 parent f517bb9 commit 75f5c08
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
7 changes: 6 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Upcoming

## Needed for release 0.2.7
## Needed for release 0.2.9

- [ ] Add tests for the workflow building
- [ ] Add tests for ts code gen from workflow
- [ ] Better error handling when workflows fail (and related tests)

## Needed for release 0.3.x
Expand Down Expand Up @@ -48,3 +49,7 @@

- [x] Add helper to convert a JSON workflow in its ts equivalent.
- [x] Improve examples and the related documentation

## Needed for release 0.2.7

- [x] Added support for `models/type` from updated comfy backends
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"module": "index.ts",
"type": "module",
"license": "BSD-3-Clause",
"version": "0.2.6",
"version": "0.2.7",
"description": "Wrapper for the REST endpoints of a comfyui instance & some quality of life utils.",
"author": {
"name": "karurochari",
Expand Down
17 changes: 17 additions & 0 deletions src/comfy-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export class ComfyClient {

/**
* @returns Available embeddings from ComfyUI
* @deprecated This function has been de-facto replaced by models("embeddings") on modern comfy instances
*/
async embeddings() {
return await (
Expand All @@ -173,6 +174,22 @@ export class ComfyClient {
).json()
}

/**
* @returns Available embeddings from ComfyUI
* @deprecated This function has been de-facto replaced by models("embeddings") on modern comfy instances
*/
async models(type:string) {
return await (
await fetch(
`http${this.#secure ? "s" : ""}://${this.#endpoint}/models/${type}?${new URLSearchParams({
clientId: this.#uid,
}).toString()}`,
{ method: "GET" },
)
).json()
}


/**
* @returns Listing all extensions installed on a ComfyUI instance
*/
Expand Down

0 comments on commit 75f5c08

Please sign in to comment.