Buckets:
| # Video Processor | |
| `VideoProcessor`는 VAE 인코딩을 위한 입력 준비와 디코딩 후 출력의 후처리를 수행하도록 비디오 파이프라인에 통합된 API를 제공합니다. 이 클래스는 [VaeImageProcessor](/docs/diffusers/main/ko/api/image_processor#diffusers.VaeImageProcessor)를 상속하므로 리사이즈, 정규화, PIL Image, PyTorch, NumPy 배열 간의 변환과 같은 변환을 포함합니다. | |
| ## VideoProcessor[[diffusers.VideoProcessor.preprocess_video]] | |
| #### diffusers.VideoProcessor.preprocess_video[[diffusers.VideoProcessor.preprocess_video]] | |
| ```python | |
| diffusers.VideoProcessor.preprocess_video(video, height: int | None = None, width: int | None = None, **kwargs) | |
| ``` | |
| [소스](https://github.com/huggingface/diffusers/blob/main/src/diffusers/video_processor.py#L28) | |
| **매개변수:** | |
| video (`list[PIL.Image]`, `list[list[PIL.Image]]`, `torch.Tensor`, `np.array`, `list[torch.Tensor]`, `list[np.array]`) : 입력 비디오입니다. 다음 중 하나일 수 있습니다: * PIL 이미지 목록. * PIL 이미지 목록의 목록. * 4D Torch 텐서(각 텐서의 예상 shape는 `(num_frames, num_channels, height, width)`). * 4D NumPy 배열(각 배열의 예상 shape는 `(num_frames, height, width, num_channels)`). * 4D Torch 텐서 목록(각 텐서의 예상 shape는 `(num_frames, num_channels, height, width)`). * 4D NumPy 배열 목록(각 배열의 예상 shape는 `(num_frames, height, width, num_channels)`). * 5D NumPy 배열: 각 배열의 예상 shape는 `(batch_size, num_frames, height, width, num_channels)`. * 5D Torch 텐서: 각 배열의 예상 shape는 `(batch_size, num_frames, num_channels, height, width)`. | |
| height (`int`, *선택 사항*, 기본값 `None`) : 비디오의 전처리된 프레임 높이입니다. `None`인 경우 `get_default_height_width()`를 사용하여 기본 높이를 가져옵니다. | |
| width (`int`, *optional*`, defaults to `None`) : The width in preprocessed frames of the video. If `None`, will use get_default_height_width()` to get the default width. | |
| **반환값:** `torch.Tensor`, shape `(batch_size, num_channels, num_frames, height, width)` | |
| 5D 텐서로, 배치된 채널 우선 비디오를 포함합니다. | |
| 입력 비디오를 전처리합니다. 키워드 인수는 `VaeImageProcessor.preprocess`로 전달됩니다. | |
| #### diffusers.VideoProcessor.postprocess_video[[diffusers.VideoProcessor.postprocess_video]] | |
| ```python | |
| diffusers.VideoProcessor.postprocess_video(video: Tensor, output_type: str = 'np', **kwargs) | |
| ``` | |
| [소스](https://github.com/huggingface/diffusers/blob/main/src/diffusers/video_processor.py#L93) | |
| **매개변수:** | |
| video (`torch.Tensor`) : 텐서로 표현된 비디오. | |
| output_type (`str`, 기본값 `"np"`) : 후처리된 `video` 텐서의 출력 유형. | |
| 비디오 텐서를 내보내기용 프레임 목록으로 변환합니다. 키워드 인수는 `VaeImageProcessor.postprocess`로 전달됩니다. | |
Xet Storage Details
- Size:
- 2.95 kB
- Xet hash:
- 5b59e9b2cc49cc382a78e26f7dfa5a1e4c3abdfdcb96c01aa501c63eefda3201
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.