huggingface / huggingface/diffusers
Flux2KleinPipeline doesn't accept tensor format as input image
- Dominant language
- Python
- Stars
- 34.5k
- Forks
- 7.3k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 91
Description
**Is your feature request related to a problem? Please describe.**
I would like to input a tensor in the Flux2KleinPipeline image argument. Only `image: list[PIL.Image.Image] | PIL.Image.Image | None = None` is accepted although in the comment section below the arguments it states that:
`image (`torch.Tensor`, `PIL.Image.Image`, `np.ndarray`, `List[torch.Tensor]`, `List[PIL.Image.Image]`, or `List[np.ndarray]`):
`Image`, numpy array or tensor representing an image batch to be used as the starting point. For both
numpy array and pytorch tensor, the expected value range is between `[0, 1]` If it's a tensor or a list
or tensors, the expected shape should be `(B, C, H, W)` or `(C, H, W)`. If it is a numpy array or a
list of arrays, the expected shape should be `(B, H, W, C)` or `(H, W, C)` It can also accept image
latents as `image`, but if passing latents directly it is not encoded again.`
Thanks in advance,
Joan
Contributor guide
Research direction
Start at the Flux2KleinPipeline image argument and its input-processing path, comparing the declared type with the documented tensor formats. Verify support for single and batched tensors with the stated shapes and [0, 1] range; done when those inputs are accepted consistently and the relevant behavior is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100