Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'str' object has no attribute 'read' #79

Open
HanLiii opened this issue Aug 26, 2024 · 0 comments
Open

AttributeError: 'str' object has no attribute 'read' #79

HanLiii opened this issue Aug 26, 2024 · 0 comments

Comments

@HanLiii
Copy link

HanLiii commented Aug 26, 2024

Processing chunk 1 / 2
t0 = 881 t1 = 941_model.safetensors: 100%|███████████████████████████████████████████| 167M/167M [00:03<00:00, 59.8MB/s]
0%| | 0/50 [00:00<?, ?it/s]Continue DDIM with i = 0, t = 981, latent = torch.Size([1, 4, 64, 64]), device = cuda:0, type = torch.float16
2%|█▋ | 1/50 [00:09<07:46, 9.52s/it]latent t1 found at i=1, t = 961
8%|██████▋ | 4/50 [00:09<01:11, 1.55s/it]latent t0 found at i = 4, t = 901
100%|███████████████████████████████████████████████████████████████████████████████████| 50/50 [00:14<00:00, 3.48it/s]
/home/hanli/anaconda3/envs/t2vzero/lib/python3.9/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3190.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
/home/hanli/anaconda3/envs/t2vzero/lib/python3.9/site-packages/torch/nn/functional.py:4227: UserWarning: Default grid_sample and affine_grid behavior has changed to align_corners=False since 1.3.0. Please specify align_corners=True if the old behavior is desired. See the documentation of grid_sample for details.
warnings.warn(
0%| | 0/50 [00:00<?, ?it/s]Continue DDIM with i = 2, t = 941, latent = torch.Size([8, 4, 64, 64]), device = cuda:0, type = torch.float16
96%|███████████████████████████████████████████████████████████████████████████████▋ | 48/50 [00:14<00:00, 3.27it/s]
Processing chunk 2 / 2
t0 = 881 t1 = 941
0%| | 0/50 [00:00<?, ?it/s]Continue DDIM with i = 0, t = 981, latent = torch.Size([1, 4, 64, 64]), device = cuda:0, type = torch.float16
latent t1 found at i=1, t = 961
8%|██████▋ | 4/50 [00:00<00:04, 10.09it/s]latent t0 found at i = 4, t = 901
100%|███████████████████████████████████████████████████████████████████████████████████| 50/50 [00:04<00:00, 10.10it/s]
0%| | 0/50 [00:00<?, ?it/s]Continue DDIM with i = 2, t = 941, latent = torch.Size([2, 4, 64, 64]), device = cuda:0, type = torch.float16
96%|███████████████████████████████████████████████████████████████████████████████▋ | 48/50 [00:06<00:00, 6.89it/s]
Traceback (most recent call last):
File "/home/hanli/anaconda3/envs/t2vzero/lib/python3.9/site-packages/PIL/Image.py", line 3231, in open
fp.seek(0)
AttributeError: 'str' object has no attribute 'seek'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/hanli/han/Text2Video-Zero/test.py", line 10, in
model.process_text2video(prompt, fps = fps, path = out_path, **params)
File "/home/hanli/han/Text2Video-Zero/model.py", line 495, in process_text2video
return utils.create_video(result, fps, path=path, watermark=gradio_utils.logo_name_to_path(watermark))
File "/home/hanli/han/Text2Video-Zero/utils.py", line 109, in create_video
x = add_watermark(x, watermark)
File "/home/hanli/han/Text2Video-Zero/utils.py", line 29, in add_watermark
watermark = Image.open(watermark_path)
File "/home/hanli/anaconda3/envs/t2vzero/lib/python3.9/site-packages/PIL/Image.py", line 3233, in open
fp = io.BytesIO(fp.read())
AttributeError: 'str' object has no attribute 'read'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant