
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
comfy-ui-client
Advanced tools
Node.js ComfyUI client based on the WebSockets API example.
See example in examples/generate.
To install comfy-ui-client in an existing project:
npm install comfy-ui-client
import { ComfyUIClient } from 'comfy-ui-client';
import type { Prompt } from 'comfy-ui-client';
// Your prompt / workflow
const prompt: Prompt = {
'3': {
class_type: 'KSampler',
inputs: {
cfg: 8,
denoise: 1,
latent_image: ['5', 0],
model: ['4', 0],
negative: ['7', 0],
positive: ['6', 0],
sampler_name: 'euler',
scheduler: 'normal',
seed: 8566257,
steps: 20,
},
},
'4': {
class_type: 'CheckpointLoaderSimple',
inputs: {
ckpt_name: 'v1-5-pruned-emaonly.cpkt',
},
},
'5': {
class_type: 'EmptyLatentImage',
inputs: {
batch_size: 1,
height: 512,
width: 512,
},
},
'6': {
class_type: 'CLIPTextEncode',
inputs: {
clip: ['4', 1],
text: 'masterpiece best quality girl',
},
},
'7': {
class_type: 'CLIPTextEncode',
inputs: {
clip: ['4', 1],
text: 'bad hands',
},
},
'8': {
class_type: 'VAEDecode',
inputs: {
samples: ['3', 0],
vae: ['4', 2],
},
},
'9': {
class_type: 'SaveImage',
inputs: {
filename_prefix: 'ComfyUI',
images: ['8', 0],
},
},
};
// Set the text prompt for our positive CLIPTextEncode
prompt['6'].inputs.text = 'masterpiece best quality man';
// Set the seed for our KSampler node
prompt['3'].inputs.seed = 5;
// Create client
const serverAddress = '127.0.0.1:8188';
const clientId = 'baadbabe-b00b-4206-9420-deadd00d1337';
const client = new ComfyUIClient(serverAddress, clientId);
// Connect to server
await client.connect();
// Generate images
const images = await client.getImages(prompt);
// Save images to file
const outputDir = './tmp/output';
await client.saveImages(images, outputDir);
// Disconnect
await client.disconnect();
This project is licensed under the MIT License.
FAQs
WebSockets API client for ComfyUI
We found that comfy-ui-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.