Hi, I have an issue when running a ComfyUI workflow through the API from a Python script.
My workflow contains API Nodes (BRIA). When I run the workflow manually from the ComfyUI web interface everything works correctly.
However, when I trigger the same workflow via the ComfyUI API (/prompt) from Python, the job fails immediately and the UI shows the popup:
“Sign In Required to Use API Nodes”
The workflow starts processing but stops during the preprocessing stage.
Example console output from my Python script:
Input folder of photos: C:\_\_\_\_\car_test
Found 4 images.
Outputs root: C: :\_\_\_\_\car_test_processed
Processing: 1.JPG
Uploaded image name: a731sad.jpg
Submitted prompt_id: a2313-4c.....
Job status: preprocessing (elapsed: 0s)
Then the job fails because the UI asks for login.
Important details:
-
I am already logged in to the web UI in my browser.
-
The workflow runs correctly when executed manually from the UI.
-
The issue only happens when triggering the workflow via Python API.
-
It looks like the API Nodes require a browser session login, which is not available when running the workflow programmatically.
Questions:
-
Is there a way to authenticate API Nodes when running workflows through the ComfyUI API?
-
Is there a recommended way to run workflows with API Nodes in automated batch scripts?
My goal is to run batch processing from Python on a folder of images without needing manual login through the UI.
Any help would be appreciated.