Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions python/sglang/multimodal_gen/configs/sample/flux.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

@dataclass
class FluxSamplingParams(SamplingParams):
# Video parameters
# height: int = 1024
# width: int = 1024
num_frames: int = 1
# Denoising stage
guidance_scale: float = 1.0
Expand Down
3 changes: 0 additions & 3 deletions python/sglang/multimodal_gen/configs/sample/qwenimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

@dataclass
class QwenImageSamplingParams(SamplingParams):
# Video parameters
# height: int = 1024
# width: int = 1024
negative_prompt: str = " "
num_frames: int = 1
# Denoising stage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,8 @@ def __post_init__(self) -> None:

if self.width is None:
self.width_not_provided = True
self.width = 1280
if self.height is None:
self.height_not_provided = True
self.height = 720

def check_sampling_param(self):
if self.prompt_path and not self.prompt_path.endswith(".txt"):
Expand Down
4 changes: 3 additions & 1 deletion python/sglang/multimodal_gen/runtime/entrypoints/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ def prepare_request(
req = Req(**filtered_params, VSA_sparsity=server_args.VSA_sparsity)
req.adjust_size(server_args)

if req.width <= 0 or req.height <= 0:
if (req.width is not None and req.width <= 0) or (
req.height is not None and req.height <= 0
):
raise ValueError(
f"Height, width must be positive integers, got "
f"height={req.height}, width={req.width}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,7 @@ def __post_init__(self):
self.guidance_scale_2 = self.guidance_scale

def adjust_size(self, server_args: ServerArgs):
if self.height is None or self.width is None:
self.width = 1280
self.height = 720
pass

def __str__(self):
return pprint.pformat(asdict(self), indent=2, width=120)
Expand Down
Loading