Buckets:
| # 출력 | |
| 모든 모델 출력은 [BaseOutput](/docs/diffusers/main/ko/api/outputs#diffusers.utils.BaseOutput)의 하위 클래스이며, 모델이 반환하는 모든 정보를 포함하는 데이터 구조입니다. 출력은 튜플이나 사전으로也可以使用할 수 있습니다. | |
| 예를 들어: | |
| ```python | |
| from diffusers import DDIMPipeline | |
| pipeline = DDIMPipeline.from_pretrained("google/ddpm-cifar10-32") | |
| outputs = pipeline() | |
| ``` | |
| `outputs` 객체는 [ImagePipelineOutput](/docs/diffusers/main/ko/api/pipelines/consistency_models#diffusers.ImagePipelineOutput)이므로 image 속성이 있습니다. | |
| 각 속성은 일반적인 방법이나 키워드 조회를 통해 접근할 수 있으며, 해당 속성이 모델에 의해 반환되지 않으면 `None`을 반환합니다: | |
| ```python | |
| outputs.images | |
| outputs["images"] | |
| ``` | |
| `outputs` 객체를 튜플로 간주할 때, `None` 값이 없는 속성만 고려합니다. 예를 들어, 인덱싱을 통해 이미지를 가져오면 튜플 `(outputs.images)`가 반환됩니다: | |
| ```python | |
| outputs[:1] | |
| ``` | |
| > [!TIP] | |
| > 특정 pipeline 또는 모델의 출력을 확인하려면 해당 API 문서를 참조하세요. | |
| ## BaseOutput[[diffusers.utils.BaseOutput]] | |
| #### diffusers.utils.BaseOutput[[diffusers.utils.BaseOutput]] | |
| [소스](https://github.com/huggingface/diffusers/blob/main/src/diffusers/utils/outputs.py#L40) | |
| 모든 모델 출력을 위한 dataclass 기반 베이스 클래스입니다. 정수 또는 슬라이스(튜플처럼) 또는 문자열(사전처럼)로 인덱싱을 허용하는 `__getitem__`를 가지고 있으며, 이 과정에서 `None` 속성은 무시됩니다. 그 외에는 일반적인 Python 사전과 동일하게 동작합니다. | |
| > [!WARNING] > `BaseOutput`를 직접 unpack할 수 없습니다. [to_tuple()](/docs/diffusers/main/ko/api/outputs#diffusers.utils.BaseOutput.to_tuple) 메서드를 사용하여 변환 | |
| tuple > first. | |
| #### to_tuple[[diffusers.utils.BaseOutput.to_tuple]] | |
| ```python | |
| to_tuple() | |
| ``` | |
| [소스](https://github.com/huggingface/diffusers/blob/main/src/diffusers/utils/outputs.py#L130) | |
| `None`이 아닌 모든 속성/키를 포함하는 튜플로 self를 변환합니다. | |
| ## ImagePipelineOutput[[diffusers.ImagePipelineOutput]] | |
| #### diffusers.ImagePipelineOutput[[diffusers.ImagePipelineOutput]] | |
| ```python | |
| diffusers.ImagePipelineOutput(images: list[PIL.Image.Image] | numpy.ndarray) | |
| ``` | |
| [소스](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L135) | |
| **매개변수:** | |
| images (`List[PIL.Image.Image]` 또는 `np.ndarray`) : `batch_size` 길이의 노이즈 제거된 PIL 이미지 목록 또는 `(batch_size, height, width, num_channels)` 모양의 NumPy 배열. | |
| 이미지 파이프라인의 출력 클래스입니다. | |
| ## AudioPipelineOutput[[diffusers.AudioPipelineOutput]] | |
| #### diffusers.AudioPipelineOutput[[diffusers.AudioPipelineOutput]] | |
| ```python | |
| diffusers.AudioPipelineOutput(audios: ndarray) | |
| ``` | |
| [소스](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L149) | |
| **매개변수:** | |
| audios (`np.ndarray`) : `(batch_size, num_channels, sample_rate)` 모양의 NumPy 배열로 구성된 노이즈 제거된 오디오 샘플 목록. | |
| 오디오 파이프라인의 출력 클래스입니다. | |
| ## ImageTextPipelineOutput[[diffusers.ImageTextPipelineOutput]] | |
| #### diffusers.ImageTextPipelineOutput[[diffusers.ImageTextPipelineOutput]] | |
| ```python | |
| diffusers.ImageTextPipelineOutput(images: list[PIL.Image.Image] | numpy.ndarray | None, text: list[str] | list[list[str]] | None) | |
| ``` | |
| [소스](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/deprecated/unidiffuser/pipeline_unidiffuser.py#L48) | |
| **매개변수:** | |
| images (`list[PIL.Image.Image]` 또는 `np.ndarray`) : `batch_size` 길이의 노이즈 제거된 PIL 이미지 목록 또는 `(batch_size, height, width, num_channels)` 모양의 NumPy 배열. | |
| text (`list[str]` 또는 `list[list[str]]`) : 길이가 `batch_size`인 생성된 텍스트 문자열 목록 또는 외부 목록의 길이가 `batch_size`인 문자열 목록의 목록. | |
| 이미지-텍스트 결합 파이프라인의 출력 클래스입니다. | |
Xet Storage Details
- Size:
- 4.21 kB
- Xet hash:
- f1cb460704e47cfe6f23f361211a053c360d9f35b6ab3c7bae5074e75e930cbf
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.