Skip to content

[Diffusion] add rocm support#13492

Closed
sabreshao wants to merge 28 commits intosgl-project:mainfrom
sabreshao:diffusion_1118
Closed

[Diffusion] add rocm support#13492
sabreshao wants to merge 28 commits intosgl-project:mainfrom
sabreshao:diffusion_1118

Conversation

@sabreshao
Copy link
Copy Markdown
Contributor

@sabreshao sabreshao commented Nov 18, 2025

Motivation

Enable sglang diffusion on AMD hardware.

Modifications

1, Add hip path for custom_op.
2, Use Aiter as default attention backend on ROCm.

Accuracy Tests

Verified on MI308x and H20 platform.
Setup on MI308x:

  • Docker: rocm/sgl-dev:v0.5.5.post3-rocm700-mi30x-20251117
  • pip uninstall sglang
  • python -m pip --no-cache-dir install -e "python[diffusion]"
  • pip install diffusers
  • pip install imageio-ffmpeg
  • pip install remote_pdb

Validation script:

from sglang.multimodal_gen import DiffGenerator
def main():
generator = DiffGenerator.from_pretrained(
model_path="Wan-AI/Wan2.1-T2V-1.3B-Diffusers",
num_gpus=4,
)
prompt = "A curious raccoon peers through a vibrant field of yellow sunflowers, its eyes wide with interest."
video = generator.generate(
prompt,
return_frames=True,
output_path="my_videos/",
save_output=True
)
if __name__ == '__main__':
main()

Benchmarking and Profiling

Checklist

@sabreshao sabreshao requested a review from mickqian as a code owner November 18, 2025 07:16
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@github-actions github-actions Bot added the amd label Nov 18, 2025
@sabreshao sabreshao marked this pull request as draft November 18, 2025 07:16
@sabreshao sabreshao marked this pull request as ready for review November 18, 2025 16:09
@hubertlu-tw
Copy link
Copy Markdown
Collaborator

@hubertlu-tw
Copy link
Copy Markdown
Collaborator

/tag-and-rerun-ci

@mickqian
Copy link
Copy Markdown
Collaborator

We have to add tests on amd before merging this

@mickqian mickqian changed the title [Diffusion] add rocm support. [Diffusion] add rocm support Nov 20, 2025
@zyzshishui
Copy link
Copy Markdown
Contributor

Hi @sabreshao, I’ve been working on a more detailed version of the AMD diffusion support. Do you mind if I file a new PR and add you as a co-author? Really appreciate your work!

@zyzshishui zyzshishui mentioned this pull request Nov 22, 2025
6 tasks
@github-actions github-actions Bot added dependencies Pull requests that update a dependency file diffusion SGLang Diffusion labels Dec 2, 2025
@sabreshao
Copy link
Copy Markdown
Contributor Author

@hubertlu-tw #13743 merged into this PR.
@zyzshishui Thanks for contribution! I am trying to enable ROCm CI as soon as possible.

@mickqian
Copy link
Copy Markdown
Collaborator

mickqian commented Jan 8, 2026

resolved in #13760

@mickqian mickqian closed this Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

amd dependencies Pull requests that update a dependency file diffusion SGLang Diffusion run-ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants