Diffusers documentation

AceStepTransformer1DModel

You are viewing main version, which requires installation from source. If you'd like regular pip install, checkout the latest stable version (v0.42.1).
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

AceStepTransformer1DModel

ACE-Step 1.5 기반의 음악 생성용 1차원 Diffusion Transformer입니다. 이 모델은 AutoencoderOobleck가 생성한 25 Hz 스테레오 latents를 flow matching 방식으로 처리하며, Qwen3에서 파생된 backbone(grouped-query attention, rotary position embedding, RMSNorm, AdaLN-Zero timestep conditioning)와 AceStepConditionEncoder가 구축한 텍스트/가사/음색 조건에 대한 cross-attention을 결합하여 학습되었습니다.

AceStepTransformer1DModel

class diffusers.AceStepTransformer1DModel

< >

( hidden_size: int = 2048intermediate_size: int = 6144num_hidden_layers: int = 24num_attention_heads: int = 16num_key_value_heads: int = 8head_dim: int = 128in_channels: int = 192audio_acoustic_hidden_dim: int = 64patch_size: int = 2rope_theta: float = 1000000.0attention_bias: bool = Falseattention_dropout: float = 0.0rms_norm_eps: float = 1e-06sliding_window: int = 128layer_types: typing.Optional[typing.List[str]] = Noneencoder_hidden_size: typing.Optional[int] = Noneis_turbo: bool = Falsemodel_version: typing.Optional[str] = None )

ACE-Step 1.5 음악 생성용 Diffusion Transformer.

텍스트, 가사, 음색에 조건부화된 오디오 latents를 생성합니다. 1D patch embedding(patch_size 스트라이드를 가진 Conv1d)을 사용하고, self-attention 브랜치에서 슬라이딩 윈도우/풀 어텐션을 교대로 적용하는 AceStepTransformerBlock 스택을 사용합니다. Cross-attention은 AceStepConditionEncoder가 생성한 패킹된 encoder_hidden_states를 사용합니다.

forward

< >

( hidden_states: Tensortimestep: Tensortimestep_r: Tensorencoder_hidden_states: Tensorcontext_latents: Tensorattention_kwargs: typing.Optional[dict] = Nonereturn_dict: bool = True ) → Transformer2DModelOutput or tuple

매개변수

  • hidden_states (torch.Tensor, shape (batch_size, seq_len, channels)) — 확산 과정에 사용되는 노이즈가 포함된 잠재 입력입니다.
  • timestep (torch.Tensor, shape (batch_size,)) — 현재 diffusion timestep t.
  • timestep_r (torch.Tensor, shape (batch_size,)) — 참조 timestep r (표준 추론의 경우 t와 동일하게 설정).
  • encoder_hidden_states (torch.Tensor, shape (batch_size, encoder_seq_len, hidden_size)) — 조건 인코더(텍스트 + 가사 + 음색)에서 생성된 조건 임베딩입니다.
  • context_latents (torch.Tensor, shape (batch_size, seq_len, context_dim)) — 컨텍스트 라텐트(소스 라텐트에 청크 마스크를 연결한 값) — hidden_states와 함께 패치파이 컨볼루션에 입력됩니다.
  • attention_kwargs (dict, 선택 사항) — AttentionProcessor에 전달되는 kwargs 사전입니다. {"scale": float}를 통해 LoRA scale을 전달하는 데 사용됩니다.
  • return_dict (bool, 기본값 True) — Transformer2DModelOutput을 반환할지, 아니면 일반 튜플을 반환할지를 결정합니다.

반환값

Transformer2DModelOutput 또는 tuple

예측된 속도장.

AceStepTransformer1DModel의 forward 메서드입니다.

Update on GitHub