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

Wont create the video #29

Closed
stevens-Ai opened this issue Sep 19, 2023 · 3 comments
Closed

Wont create the video #29

stevens-Ai opened this issue Sep 19, 2023 · 3 comments

Comments

@stevens-Ai
Copy link

stevens-Ai commented Sep 19, 2023

I follwed the instructions to the letter, infact I copied and pasted the comands into a command prompt.
git clone [email protected]:williamyang1991/Rerender_A_Video.git --recursive
cd Rerender_A_Video
conda env create -f environment.yml
conda activate rerender
python install.py

Then
python rerender.py --cfg config/van_gogh_man.json -one
python rerender.py --cfg config/van_gogh_man.json -nb

works, I get a first frame with edge detection and video frames and keyframes.

Then running
python rerender.py --cfg config/van_gogh_man.json -nr
Fails with error:

A matching Triton is not available, some optimizations will not be enabled.
Error caught was: No module named 'triton'
logging improved.
python video_blend.py videos/pexels-antoni-shkraba-8048492-540x960-25fps --beg 1 --end 101 --itv 10 --key keys --output videos/pexels-antoni-shkraba-8048492-540x960-25fps/blend.mp4 --fps 25.0 --n_proc 4 -ps
C:\Program Files\Python310\lib\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:3484.)
return VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
C:\Program Files\Python310\lib\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:3484.)
return VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
C:\Program Files\Python310\lib\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:3484.)
return VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
C:\Program Files\Python310\lib\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:3484.)
return VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
[ WARN:[email protected]] global loadsave.cpp:2[4 4W AcRvN:::[email protected]]o dgelro biamlr elaoda_d(s'avvied.ecopsp/:p2e4x4e lcsv-:a:nftionndiD-eschokdrearb ai-m8r0e4a8d4_9(2'-v5i4d0exo9s6/0p-e2x5eflpss-\aonutto_n1i-0s0h0k2r.ajbpag-'8)0:4 8c4a9n2'-t5 4o0pxe9n6/0r-2e5afdp sf\ioluet:
3c1h\e0c0k3 2f.ijlpeg 'p)a:t hc/ainn'tte gorpietny/
reProcess Process-1:
ad file: check file path/integrity
Process Process-2:
[ WARN:[email protected]] global loadsave.cpp:244 cv::findDecoder imread
('videos/pexels-antoni-shkraba-8048492-540x960-25fps\out_81\0082.jpg'): can't open/read file: check file path/integrity
Process Process-4:
Traceback (most recent call last):
File "C:\Program Files\Python310\lib\multiprocessing\process.py", line 314, in bootstrap
self.run()
File "C:\Program Files\Python310\lib\multiprocessing\process.py", line 108, in run
self.target(*self.args, **self.kwargs)
File "D:\Ai art\Rerender_A_Video\video_blend.py", line 109, in process_sequences
process_one_sequence(i, video_sequence)
Traceback (most recent call last):
Traceback (most recent call last):
[ File "D:\Ai art\Rerender_A_Video\video_blend.py", line 96, in process_one_sequence
cmd += ' ' + g.get_cmd(j, w)
File "C:\Program Files\Python310\lib\multiprocessing\process.py", line 314, in bootstrap
self.run()
File "C:\Program Files\Python310\lib\multiprocessing\process.py", line 314, in bootstrap
self.run()
File "C:\Program Files\Python310\lib\multiprocessing\process.py", line 108, in run
self.target(*self.args, **self.kwargs)
File "D:\Ai art\Rerender_A_Video\blender\guide.py", line 100, in get_cmd
warped_img = flow_calc.warp(prev_img, self.flows[i - 1],
File "C:\Program Files\Python310\lib\multiprocessing\process.py", line 108, in run
self.target(*self.args, **self.kwargs)
File "D:\Ai art\Rerender_A_Video\video_blend.py", line 109, in process_sequences
process_one_sequence(i, video_sequence)
File "D:\Ai art\Rerender_A_Video\video_blend.py", line 96, in process_one_sequence
cmd += ' ' + g.get_cmd(j, w)
File "D:\Ai art\Rerender_A_Video\blender\guide.py", line 100, in get_cmd
warped_img = flow_calc.warp(prev_img, self.flows[i - 1],
File "D:\Ai art\Rerender_A_Video\flow\flow_utils.py", line 188, in warp
if len(img.shape) == 2:
AttributeError: 'NoneType' object has no attribute 'shape'
File "D:\Ai art\Rerender_A_Video\flow\flow_utils.py", line 188, in warp
if len(img.shape) == 2:
W File "D:\Ai art\Rerender_A_Video\video_blend.py", line 109, in process_sequences
process_one_sequence(i, video_sequence)
AttributeError: 'NoneType' object has no attribute 'shape'
AR File "D:\Ai art\Rerender_A_Video\video_blend.py", line 96, in process_one_sequence
cmd += ' ' + g.get_cmd(j, w)
N:0 File "D:\Ai art\Rerender_A_Video\blender\guide.py", line 100, in get_cmd
warped_img = flow_calc.warp(prev_img, self.flows[i - 1],
@ File "D:\Ai art\Rerender_A_Video\flow\flow_utils.py", line 188, in warp
if len(img.shape) == 2:
AttributeError: 'NoneType' object has no attribute 'shape'
9.308] global loadsave.cpp:244 cv::findDecoder imread
('videos/pexels-antoni-shkraba-8048492-540x960-25fps\out_61\0062.jpg'): can't open/read file: check file path/integrity
Process Process-3:
Traceback (most recent call last):
File "C:\Program Files\Python310\lib\multiprocessing\process.py", line 314, in bootstrap
self.run()
File "C:\Program Files\Python310\lib\multiprocessing\process.py", line 108, in run
self.target(*self.args, **self.kwargs)
File "D:\Ai art\Rerender_A_Video\video_blend.py", line 109, in process_sequences
process_one_sequence(i, video_sequence)
File "D:\Ai art\Rerender_A_Video\video_blend.py", line 96, in process_one_sequence
cmd += ' ' + g.get_cmd(j, w)
File "D:\Ai art\Rerender_A_Video\blender\guide.py", line 100, in get_cmd
warped_img = flow_calc.warp(prev_img, self.flows[i - 1],
File "D:\Ai art\Rerender_A_Video\flow\flow_utils.py", line 188, in warp
if len(img.shape) == 2:
AttributeError: 'NoneType' object has no attribute 'shape'
ebsynth: 10.451462984085083
[ WARN:[email protected]] global loadsave.cpp:244 cv::findDecoder imread
('videos/pexels-antoni-shkraba-8048492-540x960-25fps\out_1\0002.jpg'): can't open/read file: check file path/integrity
[ WARN:[email protected]] global loadsave.cpp:244 cv::findDecoder imread
('videos/pexels-antoni-shkraba-8048492-540x960-25fps\out_1\0003.jpg'): can't open/read file: check file path/integrity
[ WARN:[email protected]] global loadsave.cpp:244 cv::findDecoder imread
('videos/pexels-antoni-shkraba-8048492-540x960-25fps\out_1\0004.jpg'): can't open/read file: check file path/integrity
[ WARN:[email protected]] global loadsave.cpp:244 cv::findDecoder imread
('videos/pexels-antoni-shkraba-8048492-540x960-25fps\out_1\0005.jpg'): can't open/read file: check file path/integrity
[ WARN:[email protected]] global loadsave.cpp:244 cv::findDecoder imread
('videos/pexels-antoni-shkraba-8048492-540x960-25fps\out_1\0006.jpg'): can't open/read file: check file path/integrity
[ WARN:[email protected]] global loadsave.cpp:244 cv::findDecoder imread
('videos/pexels-antoni-shkraba-8048492-540x960-25fps\out_1\0007.jpg'): can't open/read file: check file path/integrity
[ WARN:[email protected]] global loadsave.cpp:244 cv::findDecoder imread
('videos/pexels-antoni-shkraba-8048492-540x960-25fps\out_1\0008.jpg'): can't open/read file: check file path/integrity
[ WARN:[email protected]] global loadsave.cpp:244 cv::findDecoder imread
('videos/pexels-antoni-shkraba-8048492-540x960-25fps\out_1\0009.jpg'): can't open/read file: check file path/integrity
[ WARN:[email protected]] global loadsave.cpp:244 cv::findDecoder imread
('videos/pexels-antoni-shkraba-8048492-540x960-25fps\out_1\0010.jpg'): can't open/read file: check file path/integrity
[ WARN:[email protected]] global loadsave.cpp:244 cv::findDecoder imread
('videos/pexels-antoni-shkraba-8048492-540x960-25fps\out_11\0011.jpg'): can't open/read file: check file path/integrity
[ WARN:[email protected]] global loadsave.cpp:244 cv::findDecoder imread
('videos/pexels-antoni-shkraba-8048492-540x960-25fps\out_11\0002.jpg'): can't open/read file: check file path/integrity
[ WARN:[email protected]] global loadsave.cpp:244 cv::findDecoder imread
('videos/pexels-antoni-shkraba-8048492-540x960-25fps\out_11\0003.jpg'): can't open/read file: check file path/integrity
[ WARN:[email protected]] global loadsave.cpp:244 cv::findDecoder imread
('videos/pexels-antoni-shkraba-8048492-540x960-25fps\out_11\0004.jpg'): can't open/read file: check file path/integrity
[ WARN:[email protected]] global loadsave.cpp:244 cv::findDecoder imread
('videos/pexels-antoni-shkraba-8048492-540x960-25fps\out_11\0005.jpg'): can't open/read file: check file path/integrity
[ WARN:[email protected]] global loadsave.cpp:244 cv::findDecoder imread
('videos/pexels-antoni-shkraba-8048492-540x960-25fps\out_11\0006.jpg'): can't open/read file: check file path/integrity
[ WARN:[email protected]] global loadsave.cpp:244 cv::findDecoder imread
('videos/pexels-antoni-shkraba-8048492-540x960-25fps\out_11\0007.jpg'): can't open/read file: check file path/integrity
[ WARN:[email protected]] global loadsave.cpp:244 cv::findDecoder imread
('videos/pexels-antoni-shkraba-8048492-540x960-25fps\out_11\0008.jpg'): can't open/read file: check file path/integrity
[ WARN:[email protected]] global loadsave.cpp:244 cv::findDecoder imread_('videos/pexels-antoni-shkraba-8048492-540x960-25fps\out_11\0009.jpg'): can't open/read file: check file path/integrity
[ WARN:[email protected]] global loadsave.cpp:244 cv::findDecoder imread_('videos/pexels-antoni-shkraba-8048492-540x960-25fps\out_11\0010.jpg'): can't open/read file: check file path/integrity
Traceback (most recent call last):
File "D:\Ai art\Rerender_A_Video\video_blend.py", line 318, in
main(args)
File "D:\Ai art\Rerender_A_Video\video_blend.py", line 267, in main
process_seq(video_sequence, i, blend_histogram, blend_gradient)
File "D:\Ai art\Rerender_A_Video\video_blend.py", line 198, in process_seq
dist1s.append(load_error(bin_a, img_shape))
File "D:\Ai art\Rerender_A_Video\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-antoni-shkraba-8048492-540x960-25fps\out_1\0002.bin'

folder out_1 contains 1 file 0001.jpg
folder out_11 is empty

@williamyang1991
Copy link
Owner

D:\Ai art\Rerender_A_Video\video_blend.py
your path contains a space. You can rename AI art to AI_art and retry

see #18 (comment)

@stevens-Ai
Copy link
Author

stevens-Ai commented Sep 19, 2023

THANK YOU that worked, how stupid am I?
still get another now though:

python video_blend.py videos/pexels-antoni-shkraba-8048492-540x960-25fps --beg 1 --end 101 --itv 10 --key keys  --output videos/pexels-antoni-shkraba-8048492-540x960-25fps/blend.mp4 --fps 25.0 --n_proc 4  -ps
C:\Program Files\Python310\lib\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:3484.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
C:\Program Files\Python310\lib\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:3484.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
C:\Program Files\Python310\lib\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:3484.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
C:\Program Files\Python310\lib\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:3484.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
ebsynth: 239.09909391403198
C:\Program Files\Python310\lib\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:3484.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
others: 27.91824436187744
others: 25.038713216781616
others: 24.925535917282104
others: 25.46738290786743
others: 25.459954261779785
others: 25.17094612121582
others: 25.353207111358643
others: 25.274659633636475
others: 25.584388732910156
others: 25.170040130615234
Traceback (most recent call last):
  File "D:\Ai_art\Rerender_A_Video\video_blend.py", line 318, in <module>
    main(args)
  File "D:\Ai_art\Rerender_A_Video\video_blend.py", line 269, in main
    frame_to_video(args.output, video_sequence.blending_dir, args.fps,
  File "D:\Ai_art\Rerender_A_Video\src\video_util.py", line 54, in frame_to_video
    writer.append_data(curImg)
  File "C:\Program Files\Python310\lib\site-packages\imageio\v2.py", line 226, in append_data
    return self.instance.write(im, **self.write_args)
  File "C:\Program Files\Python310\lib\site-packages\imageio\plugins\pyav.py", line 634, in write
    self.init_video_stream(codec, fps=fps, pixel_format=out_pixel_format)
  File "C:\Program Files\Python310\lib\site-packages\imageio\plugins\pyav.py", line 846, in init_video_stream
    stream = self._container.add_stream(codec, fps)
  File "av\container\output.pyx", line 61, in av.container.output.OutputContainer.add_stream
ValueError: needs one of codec_name or template

@stevens-Ai
Copy link
Author

Solved with
pip install imageio-ffmpeg

all working 100% now.

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

2 participants