rgthree/rgthree-comfy

Seed "-1" is broken when used in API mode

Closed this issue · 1 comments

Since the recent update of ComfyUI (where they have reworked the file structure of the routes), The "Seed (rgthree)" node doesn't work in API mode as intended anymore.
Meaning when I send a prompt through API while it has the value -1 in seed, somehow the prompt just detects nothing has changed comparing to previous generated image, so it doesn't change anything.

The first time I generate an image I get this :

�[33m[rgthree][Seed]�[33m Got "-1" as passed seed. This shouldn't happen when queueing from the ComfyUI frontend.�[00m
�[36m[rgthree][Seed]�[00m Server-generated random seed 207774581586457 and saving to workflow.�[00m
�[33m[rgthree][Seed]�[33m NOTE: Re-queues passing in "{seed}" and server-generated random seed won't be cached.�[00m
�[33m[rgthree][Seed]�[00m Cannot save server-generated seed to image workflow metadata because workflow was not provided.�[00m

Second time; nothing happens I just get

Prompt executed in 0.05 seconds

It used to work as expected before the major ComfyUI update. Meaning images get generated with a new seed each time.

This isn't really supported, and I can't see how it would have worked before, tbh. But the latest commit should fix it; pull the latest and you should be good.