Skip to content

setup and run custom workflow via API #383

@jjsapido

Description

@jjsapido

Your question

As title suggest I’m trying to remotely access swarmui, im currently using pythona as: requests.post(url, data=json_string, headers=headers)

Example 1 - Success
If I access swarmui standard parameters, the api work well and everything behave correctly afaik
self.data = {
"session_id": "",
"prompt": "",
"negativeprompt": "",
"seed": "-1",
"steps": "20",
...
}

Example 2 - Errore
But I can’t find a way to acces custom workflow and their custom nodes parameters
self.data = {
"textcliptextencodepositivepromptnodetextg":"custom node prompt",
"session_id": "",
"height": "1024",
"width": "1024",
"model": "xxx",
"comfyuicustomworkflow": "custom_workflow_v1",
"dropdownbasicschedulernodeschedulerr": "simple",
...
}
If I send that request and anlyze the image generated from the gui there's no workflow applied nor any custom parameter (like textcliptextencodepositivepromptnodetextg) gets properly elaborated by the server

I tried to resort to documentation but I didn’t find anything and it seems still under construction in many parts and other completely omitting this scenario.
I’m wondering if it’s just not supported yet or there’s a workaround to be able to directly call from API a custom workflow or pass a json custom workflow via api and set come custom nodes parameters as well.

Thanks for any hint

Logs

No response

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    User SupportA user needs help with something, probably not a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions