[diffusion] multi-platform: support diffusion on amd and fix encoder loading on MI325 (#13760)
Co-authored-by: Sabre Shao <sabre.shao@amd.com> Co-authored-by: Yusheng (Ethan) Su <yushengsu.thu@gmail.com> Co-authored-by: Hubert Lu <Hubert.Lu@amd.com> Co-authored-by: xsun <sunxiao04@gmail.com>
This commit is contained in:
co-authored by
Sabre Shao
Yusheng Su
Hubert Lu
xsun
parent
f2d64e6782
commit
4bf06635fc
@@ -28,6 +28,7 @@ class DiTArchConfig(ArchConfig):
|
||||
AttentionBackendEnum.SLIDING_TILE_ATTN,
|
||||
AttentionBackendEnum.SAGE_ATTN,
|
||||
AttentionBackendEnum.FA,
|
||||
AttentionBackendEnum.AITER,
|
||||
AttentionBackendEnum.TORCH_SDPA,
|
||||
AttentionBackendEnum.VIDEO_SPARSE_ATTN,
|
||||
AttentionBackendEnum.VMOBA_ATTN,
|
||||
|
||||
@@ -6,6 +6,7 @@ import dataclasses
|
||||
import hashlib
|
||||
import json
|
||||
import math
|
||||
import os
|
||||
import os.path
|
||||
import re
|
||||
import time
|
||||
@@ -201,6 +202,11 @@ class SamplingParams:
|
||||
if self.height is None:
|
||||
self.height_not_provided = True
|
||||
|
||||
# Allow env var to override num_inference_steps (for faster CI testing on AMD)
|
||||
env_steps = os.environ.get("SGLANG_TEST_NUM_INFERENCE_STEPS")
|
||||
if env_steps is not None and self.num_inference_steps is not None:
|
||||
self.num_inference_steps = int(env_steps)
|
||||
|
||||
def check_sampling_param(self):
|
||||
if self.prompt_path and not self.prompt_path.endswith(".txt"):
|
||||
raise ValueError("prompt_path must be a txt file")
|
||||
|
||||
Reference in New Issue
Block a user