Skip to content

[enhancement]: Description about ececuting workflow. #8340

@andrzejlisek

Description

@andrzejlisek

Is there an existing issue for this?

  • I have searched the existing issues

Contact Details

[email protected]

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. #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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions