-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
Is there an existing issue for this?
- I have searched the existing issues
Contact Details
What should this feature add?
I just downloaded InvokeAI 6.2.0 and I am trying to use it as GUI-less engine through REST API, similarly to ComfyUI. The my client application is in Java SE.
The planned workflow procedure:
- Create and upload workflow graph
- Upload source image (for image-to-image process only, skip this step for text-to-image)
- Run the worflow
- Wait until workflow execution is finished
- Download finally created image
I just created such workflow with ComfyUI and now, i would like to do similar with InvokeAI. I already "discussed" several times with newest version of GPT, Gemini and Claude, i got fictional, non-working examples only, so these chatbots not helped me.
I am using the http://127.0.0.1:9090/docs for the endpoint info. The very first test (the "hello world" equivalend) is prepared as following:
- I installed and run the InvokeAI as web appliacation http://127.0.0.1:9090
- I downloaded the "Deliberate v5" model in Model Manager.
- In the Workflows sections, I created the simple text-to-image workflow, tested it, and saved as TestWF.
- In my Java application, I performed GET http://127.0.0.1:9090/api/v1/workflows/ - the TestWF is listed, then I copied the workflow_id
- I performed GET http://127.0.0.1:9090/api/v1/workflows/i/36d98a0a-de1d-49f6-a23e-226c5bc2a77a and I got the JSON of my workflow
- I stucked here I am trying to prepare JSON based on the workflow JSON, to perform the POST http://127.0.0.1:9090/api/v1/queue/default/enqueue_batch
Ho to do it correctly from my Java application? How to remotely execute any workflow graph through HTTP API? The http://127.0.0.1:9090/dosc describes the JSON templates and does not help me. The doc helped only about available endpoints.
I even tried to run the example after substitution my workflow, both in Java and in Python. #6581 The example also seems not working. I am very newbie in Python, but I am advanced in Java and C#.
Alternatives
No response
Additional Content
No response