stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

The API add a function to generate a task_id

Open cklogic opened this issue 2 years ago • 4 comments

Description

  • Add the generate_task_id function to support generating task_id according to stable-diffusion-webui rules through the interface, instead of letting the caller randomly generate force_task_id and pass it to txt2img and img2img

Screenshots/videos:

Checklist:

cklogic avatar Mar 26 '24 09:03 cklogic

Why?

AUTOMATIC1111 avatar Mar 26 '24 12:03 AUTOMATIC1111

Why?

  1. If the API has a task_id generation interface, the caller does not need to develop and maintain a unique task_id generator.

  2. Or, when calling the txt2img api, return the task_id immediately and then execute it asynchronously.

cklogic avatar Mar 27 '24 01:03 cklogic

To generate random string you don't need to use an online service - you can do it locally! 😄

light-and-ray avatar Mar 28 '24 15:03 light-and-ray

just like light-and-ray says, generate task id clientside

AUTOMATIC1111 avatar Mar 30 '24 04:03 AUTOMATIC1111

reopen if there's more

AUTOMATIC1111 avatar Apr 06 '24 06:04 AUTOMATIC1111