[Core]Add GPU Diffusion Runner#822
Conversation
Signed-off-by: princepride <wangzhipeng628@gmail.com>
|
Hi! Could we please wait for #774, which micro-refactors diffusion_worker to be hardware-agnostic? Then we don't need to modify the platform_utils and npu_worker. And the |
I think #774 may need more discussions |
Signed-off-by: princepride <wangzhipeng628@gmail.com>
Signed-off-by: princepride <wangzhipeng628@gmail.com>
| destroy_distributed_env() | ||
|
|
||
|
|
||
| class WorkerProc: |
There was a problem hiding this comment.
Is its function similar to executor? Not now, but do we have plan to refractor it as executor in the future?
|
any speed difference before and after this PR? |
I am testing it. |
|
I use this script |
Signed-off-by: princepride <wangzhipeng628@gmail.com> Signed-off-by: Chen Yang <2082464740@qq.com>
Signed-off-by: princepride <wangzhipeng628@gmail.com>
Purpose
Related: #800
This PR refactors the GPU diffusion worker architecture to improve code organization and maintainability:
GPUDiffusionModelRunnerfromGPUDiffusionWorkerto follow the separation of concerns principlegpu_worker.py→gpu_diffusion_worker.pyandtest_gpu_worker.py→test_gpu_diffusion_worker.pyfor better claritynpu_worker.pyto align with the new architecture and add missing functionalityload_weights,sleep, andwake_upmethods with proper mockingTest Plan
Unit Test
Result:
Test Run Diffusion Model
Result: