You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TL;DR:
You need to invoke the workflow you've created:
constclient=/* your client instance */;constwf1=createWorkflow();constresult=awaitwf1.invoke(client);// or wf1.invoke_polling(client)
so, your case should be:
exportasyncfunctiongenerateImage(prompt: string): Promise<string>{constworkflow=newComfyUIWorkflow();// ... define this workflowconstimages=awaitworkflow.invoke_polling(client)returnimages[0].data;// image url}
Longer answer:
First, in addition to the README, we have auto-generated documentation pages which provide more detailed information, including example code and type annotations for commonly used interfaces.
Second, I'm guessing you're confused about the workflow example in the README? This example shows how to create a workflow but doesn't include code on how to use it (I reviewed it, and it does look a bit confusing 😂)
If you need to refer to complete example code, you can check out the ./examples/nodejs/main*.ts entry files. These contain fully executable code examples ranging from the simplest to slightly more complex workflows.
This is impossible to follow along.
Your examples are marked as deprecated, and your README examples don't even work with the given example files. Very confusing.
The text was updated successfully, but these errors were encountered: