{"_id":"@daggle24/comfy-ui-client","_rev":"2-a2235b0b762b987fd143974b39b8e299","name":"@daggle24/comfy-ui-client","dist-tags":{"latest":"0.1.5"},"versions":{"0.1.3":{"name":"@daggle24/comfy-ui-client","version":"0.1.3","packageManager":"pnpm@7.5.0","engines":{"node":">=18.0.0"},"description":"WebSockets API client for ComfyUI","author":{"name":"Punnawut Khowkittipaiboon","email":"me@itskaynine.com"},"license":"MIT","homepage":"https://github.com/itsKaynine/comfy-ui-client","repository":{"type":"git","url":"git+https://github.com/itsKaynine/comfy-ui-client.git"},"bugs":{"url":"https://github.com/itsKaynine/comfy-ui-client/issues"},"keywords":["comfy-ui","comfy-ui node","comfy-ui node API","comfy-ui API","comfy-ui sdk","comfy-ui-node","comfy-ui-node-api","comfy-ui-client","comfy-ui-sdk"],"main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"require":"./dist/index.js","import":"./dist/index.mjs","types":"./dist/index.d.ts"}},"scripts":{"build":"tsup src/index.ts --dts --format cjs,esm","dev":"npm run build --watch","lint":"eslint .","prettier":"prettier --config .prettierrc --write ./src"},"dependencies":{"pino":"^8.14.2","uuid":"^9.0.0","ws":"^8.13.0"},"devDependencies":{"@types/debug":"^4.1.8","@types/node":"^18.11.14","@types/uuid":"^9.0.2","@types/ws":"^8.5.5","@typescript-eslint/eslint-plugin":"^5.61.0","@typescript-eslint/parser":"^5.61.0","eslint":"^8.44.0","tsup":"^7.1.0","typescript":"~5.0"},"gitHead":"7d7ac72daf55b44fd20df8d3b9a36ce47b7e51c4","_id":"@daggle24/comfy-ui-client@0.1.3","_nodeVersion":"16.19.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-ZPXbBSKF02CgSKY+aP3uXWOBwRSlTL/I+DVhGvFWLYR07r3Vgzhwb0FmwrlW8QkcHac5ge8gCICejx1jpOm+Tw==","shasum":"459f89bff1c618b038d7aa3c163edc4b0b5d608a","tarball":"https://registry.npmjs.org/@daggle24/comfy-ui-client/-/comfy-ui-client-0.1.3.tgz","fileCount":3,"unpackedSize":5561,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCafwZnl0j9MSE0xAq7z19N36n/oODsL74QInJaZ+b8oQIgZPICUsnVSqtw6WPkSD4Xu2YwTP471o7KHY6Ga7VjHGA="}]},"_npmUser":{"name":"daggle24","email":"alejandro24.daniel@gmail.com"},"directories":{},"maintainers":[{"name":"daggle24","email":"alejandro24.daniel@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/comfy-ui-client_0.1.3_1702595635876_0.20184590320796447"},"_hasShrinkwrap":false},"0.1.4":{"name":"@daggle24/comfy-ui-client","version":"0.1.4","packageManager":"pnpm@7.5.0","engines":{"node":">=18.0.0"},"description":"WebSockets API client for ComfyUI","author":{"name":"Daniel González","email":"daniel@deliria.app"},"license":"MIT","homepage":"https://github.com/daggle24/comfy-ui-client","repository":{"type":"git","url":"git+https://github.com/daggle24/comfy-ui-client.git"},"bugs":{"url":"https://github.com/daggle24/comfy-ui-client/issues"},"keywords":["comfy-ui","comfy-ui node","comfy-ui node API","comfy-ui API","comfy-ui sdk","comfy-ui-node","comfy-ui-node-api","comfy-ui-client","comfy-ui-sdk"],"main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"require":"./dist/index.js","import":"./dist/index.mjs","types":"./dist/index.d.ts"}},"scripts":{"build":"tsup src/index.ts --dts --format cjs,esm","dev":"npm run build --watch","lint":"eslint .","prettier":"prettier --config .prettierrc --write ./src"},"dependencies":{"pino":"^8.14.2","uuid":"^9.0.0","ws":"^8.13.0"},"devDependencies":{"@types/debug":"^4.1.8","@types/node":"^18.11.14","@types/uuid":"^9.0.2","@types/ws":"^8.5.5","@typescript-eslint/eslint-plugin":"^5.61.0","@typescript-eslint/parser":"^5.61.0","eslint":"^8.44.0","tsup":"^7.1.0","typescript":"~5.0"},"gitHead":"7d7ac72daf55b44fd20df8d3b9a36ce47b7e51c4","_id":"@daggle24/comfy-ui-client@0.1.4","_nodeVersion":"16.19.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-L7mfYoDvENpTrTo0HlxyX6mFaXfdgp/lR/GUFucXTqMCQcdE6nTB8aQXXcqG3P7Qr4gWq0ZOt29aeq2ZWgfCxA==","shasum":"d5dc1c305bd222259c4e45c51b8f687f35477e32","tarball":"https://registry.npmjs.org/@daggle24/comfy-ui-client/-/comfy-ui-client-0.1.4.tgz","fileCount":3,"unpackedSize":5547,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFbQNuvBN0TKmRbqkIQpngwCv03jgb6BYiWjBDqB3XI0AiEAlRepEbd12wFLuIydTXexEIYVuyVQW5bAmaDe91eR4pU="}]},"_npmUser":{"name":"daggle24","email":"alejandro24.daniel@gmail.com"},"directories":{},"maintainers":[{"name":"daggle24","email":"alejandro24.daniel@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/comfy-ui-client_0.1.4_1702596058665_0.17999204621530285"},"_hasShrinkwrap":false},"0.1.5":{"name":"@daggle24/comfy-ui-client","version":"0.1.5","packageManager":"pnpm@7.5.0","engines":{"node":">=18.0.0"},"description":"WebSockets API client for ComfyUI","author":{"name":"Daniel González","email":"daniel@deliria.app"},"license":"MIT","homepage":"https://github.com/daggle24/comfy-ui-client","repository":{"type":"git","url":"git+https://github.com/daggle24/comfy-ui-client.git"},"bugs":{"url":"https://github.com/daggle24/comfy-ui-client/issues"},"keywords":["comfy-ui","comfy-ui node","comfy-ui node API","comfy-ui API","comfy-ui sdk","comfy-ui-node","comfy-ui-node-api","comfy-ui-client","comfy-ui-sdk"],"main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"require":"./dist/index.js","import":"./dist/index.mjs","types":"./dist/index.d.ts"}},"scripts":{"build":"tsup src/index.ts --dts --format cjs,esm","dev":"npm run build --watch","lint":"eslint .","prettier":"prettier --config .prettierrc --write ./src"},"dependencies":{"pino":"^8.14.2","uuid":"^9.0.0","ws":"^8.13.0"},"devDependencies":{"@types/debug":"^4.1.8","@types/node":"^18.11.14","@types/uuid":"^9.0.2","@types/ws":"^8.5.5","@typescript-eslint/eslint-plugin":"^5.61.0","@typescript-eslint/parser":"^5.61.0","eslint":"^8.44.0","tsup":"^7.1.0","typescript":"~5.0"},"gitHead":"7d7ac72daf55b44fd20df8d3b9a36ce47b7e51c4","_id":"@daggle24/comfy-ui-client@0.1.5","_nodeVersion":"16.19.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-AbsIvHAHUGE424fWV4uT6t7Z4wk7eU12WyixhZdzbDRhNLe2d+Ll32pN7MsEe354roQ/TE1cEhuYBfybIcoTwg==","shasum":"26c3f4db52d150a343f3376b6572b0173f4895a6","tarball":"https://registry.npmjs.org/@daggle24/comfy-ui-client/-/comfy-ui-client-0.1.5.tgz","fileCount":7,"unpackedSize":31767,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGgPVaeBBmCmCw0gjnNuXEH2/zrcDTQLhzdRB0wZBZv4AiEAvWJoyl9evEJOXZC6Y9zEULv8Zyu6AsFw+5IWoPbKqhM="}]},"_npmUser":{"name":"daggle24","email":"alejandro24.daniel@gmail.com"},"directories":{},"maintainers":[{"name":"daggle24","email":"alejandro24.daniel@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/comfy-ui-client_0.1.5_1702596211977_0.8975693576259598"},"_hasShrinkwrap":false}},"time":{"created":"2023-12-14T23:13:55.812Z","0.1.3":"2023-12-14T23:13:56.025Z","modified":"2023-12-14T23:23:32.345Z","0.1.4":"2023-12-14T23:20:58.825Z","0.1.5":"2023-12-14T23:23:32.166Z"},"maintainers":[{"name":"daggle24","email":"alejandro24.daniel@gmail.com"}],"description":"WebSockets API client for ComfyUI","homepage":"https://github.com/daggle24/comfy-ui-client","keywords":["comfy-ui","comfy-ui node","comfy-ui node API","comfy-ui API","comfy-ui sdk","comfy-ui-node","comfy-ui-node-api","comfy-ui-client","comfy-ui-sdk"],"repository":{"type":"git","url":"git+https://github.com/daggle24/comfy-ui-client.git"},"author":{"name":"Daniel González","email":"daniel@deliria.app"},"bugs":{"url":"https://github.com/daggle24/comfy-ui-client/issues"},"license":"MIT","readme":"# ComfyUI Client\n\n[![npm][badge-version]][npm]\n[![license][badge-license]][license]\n\nNode.js [ComfyUI](https://github.com/comfyanonymous/ComfyUI) client based on the [WebSockets API example](https://github.com/comfyanonymous/ComfyUI/blob/master/script_examples/websockets_api_example.py).\n\nSee example in [`examples/generate`][examples-generate].\n\n## Install\n\nTo install `comfy-ui-client` in an existing project:\n\n```sh\nnpm install comfy-ui-client\n```\n\n## Example Usage\n\n```ts\nimport { ComfyUIClient } from 'comfy-ui-client';\nimport type { Prompt } from 'comfy-ui-client';\n\n// Your prompt / workflow\nconst prompt: Prompt = {\n    '3': {\n        class_type: 'KSampler',\n        inputs: {\n            cfg: 8,\n            denoise: 1,\n            latent_image: ['5', 0],\n            model: ['4', 0],\n            negative: ['7', 0],\n            positive: ['6', 0],\n            sampler_name: 'euler',\n            scheduler: 'normal',\n            seed: 8566257,\n            steps: 20,\n        },\n    },\n    '4': {\n        class_type: 'CheckpointLoaderSimple',\n        inputs: {\n            ckpt_name: 'v1-5-pruned-emaonly.cpkt',\n        },\n    },\n    '5': {\n        class_type: 'EmptyLatentImage',\n        inputs: {\n            batch_size: 1,\n            height: 512,\n            width: 512,\n        },\n    },\n    '6': {\n        class_type: 'CLIPTextEncode',\n        inputs: {\n            clip: ['4', 1],\n            text: 'masterpiece best quality girl',\n        },\n    },\n    '7': {\n        class_type: 'CLIPTextEncode',\n        inputs: {\n            clip: ['4', 1],\n            text: 'bad hands',\n        },\n    },\n    '8': {\n        class_type: 'VAEDecode',\n        inputs: {\n            samples: ['3', 0],\n            vae: ['4', 2],\n        },\n    },\n    '9': {\n        class_type: 'SaveImage',\n        inputs: {\n            filename_prefix: 'ComfyUI',\n            images: ['8', 0],\n        },\n    },\n};\n\n// Set the text prompt for our positive CLIPTextEncode\nprompt['6'].inputs.text = 'masterpiece best quality man';\n\n// Set the seed for our KSampler node\nprompt['3'].inputs.seed = 5;\n\n// Create client\nconst serverAddress = '127.0.0.1:8188';\nconst clientId = 'baadbabe-b00b-4206-9420-deadd00d1337';\nconst client = new ComfyUIClient(serverAddress, clientId);\n\n// Connect to server\nawait client.connect();\n\n// Generate images\nconst images = await client.getImages(prompt);\n\n// Save images to file\nconst outputDir = './tmp/output';\nawait client.saveImages(images, outputDir);\n\n// Disconnect\nawait client.disconnect();\n```\n\n## License\n\nThis project is licensed under the [MIT License][license].\n\n[badge-version]: https://img.shields.io/npm/v/comfy-ui-client.svg\n[badge-license]: https://img.shields.io/npm/l/comfy-ui-client.svg\n\n[npm]: https://www.npmjs.com/package/comfy-ui-client\n[license]: https://github.com/itsKaynine/comfy-ui-client/blob/main/LICENSE\n\n[examples-generate]: https://github.com/itsKaynine/comfy-ui-client/tree/main/examples/generate\n","readmeFilename":"README.md"}