Upload extensions_built_in/diffusion_models/hidream/src/pipelines/hidream_image/pipeline_output.py with huggingface_hub
Browse files
extensions_built_in/diffusion_models/hidream/src/pipelines/hidream_image/pipeline_output.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from dataclasses import dataclass
|
| 2 |
+
from typing import List, Union
|
| 3 |
+
|
| 4 |
+
import numpy as np
|
| 5 |
+
import PIL.Image
|
| 6 |
+
|
| 7 |
+
from diffusers.utils import BaseOutput
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
@dataclass
|
| 11 |
+
class HiDreamImagePipelineOutput(BaseOutput):
|
| 12 |
+
"""
|
| 13 |
+
Output class for HiDreamImage pipelines.
|
| 14 |
+
|
| 15 |
+
Args:
|
| 16 |
+
images (`List[PIL.Image.Image]` or `np.ndarray`)
|
| 17 |
+
List of denoised PIL images of length `batch_size` or numpy array of shape `(batch_size, height, width,
|
| 18 |
+
num_channels)`. PIL images or numpy array present the denoised images of the diffusion pipeline.
|
| 19 |
+
"""
|
| 20 |
+
|
| 21 |
+
images: Union[List[PIL.Image.Image], np.ndarray]
|