Diffusers documentation
PiflowScheduler
PiflowScheduler
PiflowScheduler는 distilled Kandinsky 6 체크포인트의 few-step 스케줄러입니다. 텍스트/이미지-투-비디오-오디오 모델과 비디오 초해상도 모델, 그리고 distilled Kandinsky S2V 1.0 체크포인트 모두에 적용됩니다. π-Flow를 구현하며, transformer가 소수의 그리드 포인트에서 각 latent 채널당 n_grid개의 denoised 추정치를 예측하고, 스케줄러는 이 추정치들 사이에 network-free 정책을 적분합니다.
참조 구현은 Lakonik/LakonLab에서 찾을 수 있습니다.
PiflowScheduler
클래스 diffusers.PiflowScheduler
< source >( num_train_timesteps: int = 1000shift: float = 5.0n_grid: int = 10eps: float = 1e-06final_step_size_scale: float = 0.5num_policy_substeps: int = 128 )
매개변수
- num_train_timesteps (
int, 선택 사항, 기본값 1000) — 학습용 diffusion 단계 수. - shift (
float, 선택 사항, 기본값 5.0) — Flow-matching timestep shift입니다. - n_grid (
int, 선택 사항, 기본값 10) — 확장된 모델 출력의 예측 개수. - eps (
float, 선택 사항, 기본값 1e-6) — 최소 timestep 및 정책 분모. - final_step_size_scale (
float, 선택 사항, 기본값 0.5) — 최종 raw-timestep 세그먼트의 상대적 크기. - num_policy_substeps (
int, 선택 사항, 기본값 128) — raw-timestep 단위당 최대 정책 적분 서브스텝 수.
확장된 출력의 diffusion transformer를 위한 Few-step PiFlow 스케줄러.
PiFlow는 소수의 그리드 점에서 denoising 모델을 평가하고, 해당 평가 사이에 네트워크가 없는 정책을 적분합니다. 이 스케줄러는 distilled Kandinsky 6 체크포인트, 즉 주요 video/audio 모델과 video super-resolution 모델을 위해 설계되었습니다. 이들의 모델 출력에는 샘플 채널당 n_grid개의 예측 값이 포함됩니다.
이 스케줄러는 SchedulerMixin과 ConfigMixin을 상속합니다. 모든 스케줄러에 대해 구현된 일반적 메서드(로드, 저장 등)에 대해서는 상위 클래스 문서를 확인하세요.
set_timesteps
< source >( num_inference_steps: int | None = Nonedevice: typing.Union[str, torch.device, NoneType] = Nonesigmas: list[float] | None = Nonemu: float | None = Nonetimesteps: list[float] | None = None )
증류된 PiFlow의 timestep schedule을 설정합니다.
단계
< source >( model_output: FloatTensortimestep: typing.Union[float, torch.FloatTensor]sample: FloatTensorreturn_dict: bool = True ) → [PiflowSchedulerOutput] or tuple
PiFlow 정책을 통합하여 한 단계 진전합니다.
PiflowSchedulerOutput
클래스 diffusers.schedulers.scheduling_piflow.PiflowSchedulerOutput
< source >( prev_sample: Tensor )
스케줄러의 step 함수 출력을 위한 출력 클래스입니다.