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

FileNotFoundError: [Errno 2] No such file or directory #109

Open
gmzhang01 opened this issue Nov 7, 2023 · 5 comments
Open

FileNotFoundError: [Errno 2] No such file or directory #109

gmzhang01 opened this issue Nov 7, 2023 · 5 comments

Comments

@gmzhang01
Copy link

I install the source code in Linux,
Use the following commands according to Installation:
python rerender.py --cfg config/real2sculpture.json
Some keyframes have been generated. I have modified the path to make sure there are no - or spaces in the path, but I still get the following error:

Data shape for DDIM sampling is (1, 4, 40, 64), eta 0.0
Running DDIM Sampling with 20 timesteps
DDIM Sampler: 100%|████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:03<00:00, 6.02it/s]
101
Global seed set to 0
Data shape for DDIM sampling is (1, 4, 40, 64), eta 0.0
Running DDIM Sampling with 20 timesteps
DDIM Sampler: 100%|████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:03<00:00, 6.03it/s]
Global seed set to 0
Data shape for DDIM sampling is (1, 4, 40, 64), eta 0.0
Running DDIM Sampling with 20 timesteps
DDIM Sampler: 100%|████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:03<00:00, 6.00it/s]
python video_blend.py videos/pexels --beg 1 --end 101 --itv 10 --key keys --output videos/pexels/blend.mp4 --fps 25.0 --n_proc 4 -ps
/root/miniconda3/lib/python3.8/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:3483.)
return VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
/root/miniconda3/lib/python3.8/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:3483.)
return VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
/root/miniconda3/lib/python3.8/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:3483.)
return VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
/root/miniconda3/lib/python3.8/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:3483.)
return VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
[ WARN:0@4.229] global loadsave.cpp:248 findDecoder imread
('videos/pexels/out_81/0082.jpg'): can't open/read file: check file path/integrity
Process Process-4:
Traceback (most recent call last):
File "/root/miniconda3/lib/python3.8/multiprocessing/process.py", line 315, in bootstrap
self.run()
File "/root/miniconda3/lib/python3.8/multiprocessing/process.py", line 108, in run
self.target(*self.args, **self.kwargs)
File "/root/Rerender_A_Video/video_blend.py", line 109, in process_sequences
process_one_sequence(i, video_sequence)
File "/root/Rerender_A_Video/video_blend.py", line 96, in process_one_sequence
cmd += ' ' + g.get_cmd(j, w)
File "/root/Rerender_A_Video/blender/guide.py", line 96, in get_cmd
warped_img = flow_calc.warp(prev_img, self.flows[i - 1],
File "/root/Rerender_A_Video/flow/flow_utils.py", line 230, in warp
if len(img.shape) == 2:
AttributeError: 'NoneType' object has no attribute 'shape'
[ WARN:0@4.294] global loadsave.cpp:248 findDecoder imread
('videos/pexels/out_61/0062.jpg'): can't open/read file: check file path/integrity
Process Process-3:
Traceback (most recent call last):
File "/root/miniconda3/lib/python3.8/multiprocessing/process.py", line 315, in bootstrap
self.run()
File "/root/miniconda3/lib/python3.8/multiprocessing/process.py", line 108, in run
self.target(*self.args, **self.kwargs)
File "/root/Rerender_A_Video/video_blend.py", line 109, in process_sequences
process_one_sequence(i, video_sequence)
File "/root/Rerender_A_Video/video_blend.py", line 96, in process_one_sequence
cmd += ' ' + g.get_cmd(j, w)
File "/root/Rerender_A_Video/blender/guide.py", line 96, in get_cmd
warped_img = flow_calc.warp(prev_img, self.flows[i - 1],
File "/root/Rerender_A_Video/flow/flow_utils.py", line 230, in warp
if len(img.shape) == 2:
AttributeError: 'NoneType' object has no attribute 'shape'
[ WARN:0@4.938] global loadsave.cpp:248 findDecoder imread
('videos/pexels/out_1/0002.jpg'): can't open/read file: check file path/integrity
Process Process-1:
Traceback (most recent call last):
File "/root/miniconda3/lib/python3.8/multiprocessing/process.py", line 315, in bootstrap
self.run()
File "/root/miniconda3/lib/python3.8/multiprocessing/process.py", line 108, in run
self.target(*self.args, **self.kwargs)
File "/root/Rerender_A_Video/video_blend.py", line 109, in process_sequences
process_one_sequence(i, video_sequence)
File "/root/Rerender_A_Video/video_blend.py", line 96, in process_one_sequence
cmd += ' ' + g.get_cmd(j, w)
File "/root/Rerender_A_Video/blender/guide.py", line 96, in get_cmd
warped_img = flow_calc.warp(prev_img, self.flows[i - 1],
File "/root/Rerender_A_Video/flow/flow_utils.py", line 230, in warp
if len(img.shape) == 2:
AttributeError: 'NoneType' object has no attribute 'shape'
[ WARN:0@4.948] global loadsave.cpp:248 findDecoder imread
('videos/pexels/out_31/0032.jpg'): can't open/read file: check file path/integrity
Process Process-2:
Traceback (most recent call last):
File "/root/miniconda3/lib/python3.8/multiprocessing/process.py", line 315, in bootstrap
self.run()
File "/root/miniconda3/lib/python3.8/multiprocessing/process.py", line 108, in run
self.target(*self.args, **self.kwargs)
File "/root/Rerender_A_Video/video_blend.py", line 109, in process_sequences
process_one_sequence(i, video_sequence)
File "/root/Rerender_A_Video/video_blend.py", line 96, in process_one_sequence
cmd += ' ' + g.get_cmd(j, w)
File "/root/Rerender_A_Video/blender/guide.py", line 96, in get_cmd
warped_img = flow_calc.warp(prev_img, self.flows[i - 1],
File "/root/Rerender_A_Video/flow/flow_utils.py", line 230, in warp
if len(img.shape) == 2:
AttributeError: 'NoneType' object has no attribute 'shape'
ebsynth: 6.051947832107544
[ WARN:0@8.699] global loadsave.cpp:248 findDecoder imread
('videos/pexels/out_1/0002.jpg'): can't open/read file: check file path/integrity
[ WARN:0@8.699] global loadsave.cpp:248 findDecoder imread
('videos/pexels/out_1/0003.jpg'): can't open/read file: check file path/integrity
[ WARN:0@8.699] global loadsave.cpp:248 findDecoder imread
('videos/pexels/out_1/0004.jpg'): can't open/read file: check file path/integrity
[ WARN:0@8.699] global loadsave.cpp:248 findDecoder imread
('videos/pexels/out_1/0005.jpg'): can't open/read file: check file path/integrity
[ WARN:0@8.699] global loadsave.cpp:248 findDecoder imread
('videos/pexels/out_1/0006.jpg'): can't open/read file: check file path/integrity
[ WARN:0@8.699] global loadsave.cpp:248 findDecoder imread
('videos/pexels/out_1/0007.jpg'): can't open/read file: check file path/integrity
[ WARN:0@8.699] global loadsave.cpp:248 findDecoder imread
('videos/pexels/out_1/0008.jpg'): can't open/read file: check file path/integrity
[ WARN:0@8.699] global loadsave.cpp:248 findDecoder imread
('videos/pexels/out_1/0009.jpg'): can't open/read file: check file path/integrity
[ WARN:0@8.699] global loadsave.cpp:248 findDecoder imread
('videos/pexels/out_1/0010.jpg'): can't open/read file: check file path/integrity
[ WARN:0@8.699] global loadsave.cpp:248 findDecoder imread
('videos/pexels/out_11/0011.jpg'): can't open/read file: check file path/integrity
[ WARN:0@8.699] global loadsave.cpp:248 findDecoder imread
('videos/pexels/out_11/0002.jpg'): can't open/read file: check file path/integrity
[ WARN:0@8.699] global loadsave.cpp:248 findDecoder imread
('videos/pexels/out_11/0003.jpg'): can't open/read file: check file path/integrity
[ WARN:0@8.699] global loadsave.cpp:248 findDecoder imread
('videos/pexels/out_11/0004.jpg'): can't open/read file: check file path/integrity
[ WARN:0@8.699] global loadsave.cpp:248 findDecoder imread
('videos/pexels/out_11/0005.jpg'): can't open/read file: check file path/integrity
[ WARN:0@8.699] global loadsave.cpp:248 findDecoder imread
('videos/pexels/out_11/0006.jpg'): can't open/read file: check file path/integrity
[ WARN:0@8.699] global loadsave.cpp:248 findDecoder imread
('videos/pexels/out_11/0007.jpg'): can't open/read file: check file path/integrity
[ WARN:0@8.699] global loadsave.cpp:248 findDecoder imread_('videos/pexels/out_11/0008.jpg'): can't open/read file: check file path/integrity
[ WARN:0@8.699] global loadsave.cpp:248 findDecoder imread_('videos/pexels/out_11/0009.jpg'): can't open/read file: check file path/integrity
[ WARN:0@8.699] global loadsave.cpp:248 findDecoder imread_('videos/pexels/out_11/0010.jpg'): can't open/read file: check file path/integrity
Traceback (most recent call last):
File "video_blend.py", line 318, in
main(args)
File "video_blend.py", line 267, in main
process_seq(video_sequence, i, blend_histogram, blend_gradient)
File "video_blend.py", line 198, in process_seq
dist1s.append(load_error(bin_a, img_shape))
File "video_blend.py", line 159, in load_error
with open(bin_path, 'rb') as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'videos/pexels/out_1/0002.bin'

@williamyang1991
Copy link
Owner

williamyang1991 commented Nov 7, 2023

You issue is very similar to this one #32
You can try the solutions in that issue.

@gmzhang01
Copy link
Author

You issue is very similar to this one #32 You can try the solutions in that issue.
Hello, I reinstalled ebsynth and the above problem did not occur again.
But a new problem arose. All stylized key frames here have been generated, and all frames have also been generated based on these stylized key frames.
Next, it seems that a new video should be generated, but an error is reported here. I tried setting --n_proc 1, but the problem didn't solve either

result was written to /root/Rerender_A_Video/videos/pexels/out_101/0094.jpg
./deps/ebsynth/bin/ebsynth -style /root/Rerender_A_Video/videos/pexels/keys/0101.png -guide /root/Rerender_A_Video/videos/pexels/video/0101.png /root/Rerender_A_Video/videos/pexels/video/0093.png -weight 6 -guide /root/Rerender_A_Video/videos/pexels/tmp/out_101/edge_0101.jpg /root/Rerender_A_Video/videos/pexels/tmp/out_101/edge_0093.jpg -weight 0.5 -guide /root/Rerender_A_Video/videos/pexels/tmp/out_101/temporal_0101.jpg /root/Rerender_A_Video/videos/pexels/tmp/out_101/temporal_0093.jpg -weight 0.5 -guide /root/Rerender_A_Video/videos/pexels/tmp/out_101/pos_0101.jpg /root/Rerender_A_Video/videos/pexels/tmp/out_101/pos_0093.jpg -weight 2 -output /root/Rerender_A_Video/videos/pexels/out_101/0093.jpg -searchvoteiters 12 -patchmatchiters 6
uniformity: 3500
patchsize: 5
pyramidlevels: 5
searchvoteiters: 12
patchmatchiters: 6
stopthreshold: 5
extrapass3x3: no
backend: cuda
styleChannels: 3
styleAuxChannels: 0
result was written to /root/Rerender_A_Video/videos/pexels/out_101/0093.jpg
./deps/ebsynth/bin/ebsynth -style /root/Rerender_A_Video/videos/pexels/keys/0101.png -guide /root/Rerender_A_Video/videos/pexels/video/0101.png /root/Rerender_A_Video/videos/pexels/video/0092.png -weight 6 -guide /root/Rerender_A_Video/videos/pexels/tmp/out_101/edge_0101.jpg /root/Rerender_A_Video/videos/pexels/tmp/out_101/edge_0092.jpg -weight 0.5 -guide /root/Rerender_A_Video/videos/pexels/tmp/out_101/temporal_0101.jpg /root/Rerender_A_Video/videos/pexels/tmp/out_101/temporal_0092.jpg -weight 0.5 -guide /root/Rerender_A_Video/videos/pexels/tmp/out_101/pos_0101.jpg /root/Rerender_A_Video/videos/pexels/tmp/out_101/pos_0092.jpg -weight 2 -output /root/Rerender_A_Video/videos/pexels/out_101/0092.jpg -searchvoteiters 12 -patchmatchiters 6
uniformity: 3500
patchsize: 5
pyramidlevels: 5
searchvoteiters: 12
patchmatchiters: 6
stopthreshold: 5
extrapass3x3: no
backend: cuda
styleChannels: 3
styleAuxChannels: 0
result was written to /root/Rerender_A_Video/videos/pexels/out_101/0092.jpg
ebsynth: 144.88836884498596
Traceback (most recent call last):
File "video_blend.py", line 318, in
main(args)
File "video_blend.py", line 267, in main
process_seq(video_sequence, i, blend_histogram, blend_gradient)
File "video_blend.py", line 198, in process_seq
dist1s.append(load_error(bin_a, img_shape))
File "video_blend.py", line 159, in load_error
with open(bin_path, 'rb') as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'videos/pexels/out_1/0002.bin'

55

@williamyang1991
Copy link
Owner

all frames have also been generated based on these stylized key frames.

Based on this, your ebsynth should work fine.
Maybe you can delete all the files (tmp, out_*) and rerun the program?

Or manually run Ebsynth on the interval where images are missing #32 (comment)

@shiyueGG
Copy link

所有帧也是基于这些风格化关键帧生成的。

基于此,您的 ebsynth 应该可以正常工作。 也许您可以删除所有文件(tmp、out_*)并重新运行程序?

或者在图像丢失的时间间隔手动运行 Ebsynth #32(评论)

linux doesn have ebsynth

@FurkanGozukara
Copy link

linux have it

i have runpod installer which works

Turn Videos Into Animation / 3D Just 1 Click - ReRender A Video Tutorial - Installer For RunPod

https://youtu.be/cVf9Qf_pKks

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

4 participants