invoke-ai / invoke-ai/InvokeAI

[enhancement]: Description about ececuting workflow.

Open
#8,340 5 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
28.2k
Forks
3k
Avg merge
6d 5h
Merged PRs (30d)
19

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Contact Details

andrzejlisek@poczta.onet.pl

### 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:
1. Create and upload workflow graph
2. Upload source image (for image-to-image process only, skip this step for text-to-image)
3. Run the worflow
4. Wait until workflow execution is finished
5. 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:
1. I installed and run the InvokeAI as web appliacation http://127.0.0.1:9090
2. I downloaded the "Deliberate v5" model in Model Manager.
3. In the Workflows sections, I created the simple text-to-image workflow, tested it, and saved as TestWF.
4. 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
5. 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
6. **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. https://github.com/invoke-ai/InvokeAI/issues/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_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.