[diffusion] model: support FireRed-Image-Edit (#20862)
Co-authored-by: yuumn <1010797597@qqã.com>
This commit is contained in:
@@ -46,6 +46,11 @@ class QwenImageArchConfig(TextEncoderArchConfig):
|
|||||||
head_dim: int | None = None
|
head_dim: int | None = None
|
||||||
hidden_state_skip_layer: int = 2
|
hidden_state_skip_layer: int = 2
|
||||||
text_len: int = 512
|
text_len: int = 512
|
||||||
|
vision_start_token_id: int = 151652
|
||||||
|
vision_end_token_id: int = 151653
|
||||||
|
vision_token_id: int = 151654
|
||||||
|
image_token_id: int = 151655
|
||||||
|
video_token_id: int = 151656
|
||||||
|
|
||||||
stacked_params_mapping: list[tuple[str, str, str]] = field(
|
stacked_params_mapping: list[tuple[str, str, str]] = field(
|
||||||
default_factory=lambda: [
|
default_factory=lambda: [
|
||||||
|
|||||||
@@ -829,6 +829,16 @@ def _register_configs():
|
|||||||
model_detectors=[lambda hf_id: "sana" in hf_id.lower()],
|
model_detectors=[lambda hf_id: "sana" in hf_id.lower()],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# FireRed-Image-Edit
|
||||||
|
register_configs(
|
||||||
|
sampling_param_cls=QwenImageEditPlusSamplingParams,
|
||||||
|
pipeline_config_cls=QwenImageEditPlusPipelineConfig,
|
||||||
|
hf_model_paths=[
|
||||||
|
"FireRedTeam/FireRed-Image-Edit-1.0",
|
||||||
|
"FireRedTeam/FireRed-Image-Edit-1.1",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
_register_configs()
|
_register_configs()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user