Add thread-safe wrappers for components in pipeline (examples/server-async/utils/requestscopedpipeline.py)
What does this PR do?
In the file examples/server-async/utils/requestscopedpipeline.py, add thread-safe wrappers for the tokenizer, VAE, and image processor. Introduce locking mechanisms to ensure thread safety during concurrent access.
This improves memory safety when using the VAE and ImageProcessor wrappers, helping to avoid memory leaks.
Who can review?
Core library / Schedulers / Pipelines: @yiyixuxu, @asomoza, @sayakpaul
General / integrations: @DN6, @stevhliu
Ok, I'm going to move the wrappers to a separate file, and it was just an update to add wrappers to the VAE and the ImageProccesor to avoid memory leaks during decoding and saving of the image when the Pipeline is executed (requestscopedpipeline.py), sorry if it wasn't very clear
Heeyyy @sayakpaul I already moved the wrappers to wrappers.py, check it out :b
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
@bot /style
Style bot fixed some files and pushed the changes.