File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 2727
2828from PIL import Image
2929
30+
3031def remote_decode (
3132 endpoint : str ,
32- tensor : torch .Tensor ,
33- processor : Optional [Union [VaeImageProcessor , VideoProcessor ]] = None ,
33+ tensor : " torch.Tensor" ,
34+ processor : Optional [Union [" VaeImageProcessor" , " VideoProcessor" ]] = None ,
3435 do_scaling : bool = True ,
3536 output_type : Literal ["mp4" , "pil" , "pt" ] = "pil" ,
3637 image_format : Literal ["png" , "jpg" ] = "jpg" ,
@@ -39,7 +40,7 @@ def remote_decode(
3940 output_tensor_type : Literal ["base64" , "binary" ] = "base64" ,
4041 height : Optional [int ] = None ,
4142 width : Optional [int ] = None ,
42- ) -> Union [Image .Image , List [Image .Image ], bytes , torch .Tensor ]:
43+ ) -> Union [Image .Image , List [Image .Image ], bytes , " torch.Tensor" ]:
4344 if tensor .ndim == 3 and height is None and width is None :
4445 raise ValueError ("`height` and `width` required for packed latents." )
4546 if output_type == "pt" and partial_postprocess is False and processor is None :
You can’t perform that action at this time.
0 commit comments