TypeError: can't assign a NoneType to a torch.cuda.HalfTensor in Huggingface Model Pipeline
#1
by
justtestingg
- opened
I encountered an error while running the example provided for the "text-to-3D" task. Below is the code I used and the error traceback:
Code:
import torch
import requests
import numpy as np
from io import BytesIO
from diffusers import DiffusionPipeline
from PIL import Image
pipeline = DiffusionPipeline.from_pretrained(
"dylanebert/LGM-full",
custom_pipeline="dylanebert/LGM-full",
torch_dtype=torch.float16,
trust_remote_code=True,
).to("cuda")
input_prompt = "a cat statue"
result = pipeline(input_prompt, None)
result_path = "/tmp/output.ply"
pipeline.save_ply(result, result_path)
Error Traceback:
Traceback (most recent call last):
File "/workspace/justtesting/generation/te.py", line 16, in <module>
result = pipeline(input_prompt, None)
File "/opt/conda/envs/justtesting/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/root/.cache/huggingface/modules/diffusers_modules/local/dylanebert--LGM-full/d8db5110f68eebab2dfb7687691babd146a933cd/pipeline.py", line 1568, in __call__
noise_pred = self.unet.forward(**unet_inputs)
File "/root/.cache/huggingface/modules/diffusers_modules/local/mv_unet.py", line 989, in forward
x[(num_frames - 1) :: num_frames, :, :, :] = ip_img # place at [4, 9]
TypeError: can't assign a NoneType to a torch.cuda.HalfTensor