stable-diffusion-webui
stable-diffusion-webui copied to clipboard
The API add a function to generate a task_id
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:
- [x] I have read contributing wiki page
- [x] I have performed a self-review of my own code
- [x] My code follows the style guidelines
- [x] My code passes tests
Why?
Why?
-
If the API has a task_id generation interface, the caller does not need to develop and maintain a unique task_id generator.
-
Or, when calling the txt2img api, return the task_id immediately and then execute it asynchronously.
To generate random string you don't need to use an online service - you can do it locally! 😄
just like light-and-ray says, generate task id clientside
reopen if there's more