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

Add support to run on Windows #187

Closed
wants to merge 3 commits into from

Conversation

donlinglok1
Copy link

Need to install Git BASH to run.

sh download.sh

Ref: AUTOMATIC1111/stable-diffusion-webui#4268 (reply in thread)

@visualinventor
Copy link

I just tried this branch on a windows 10 machine and it failed. I'd love any help getting it to work.

initialize network with normal loading the model from ./pix2pix/checkpoints/mergemodel\latest_net_G.pth Loading weights: midas/model.pt Traceback (most recent call last): File "run.py", line 580, in <module> run(dataset_, option_) File "run.py", line 59, in run midasmodel = MidasNet(midas_model_path, non_negative=True) File "D:\Development\3d-photo-inpainting\BoostingMonocularDepth\midas\models\midas_net.py", line 47, in __init__ self.load(path) File "D:\Development\3d-photo-inpainting\BoostingMonocularDepth\midas\models\base_model.py", line 12, in load parameters = torch.load(path) File "C:\ProgramData\Anaconda3\envs\3DP\lib\site-packages\torch\serialization.py", line 527, in load with _open_zipfile_reader(f) as opened_zipfile: File "C:\ProgramData\Anaconda3\envs\3DP\lib\site-packages\torch\serialization.py", line 224, in __init__ super(_open_zipfile_reader, self).__init__(torch._C.PyTorchFileReader(name_or_buffer)) RuntimeError: version_ <= kMaxSupportedFileFormatVersion INTERNAL ASSERT FAILED at ..\caffe2\serialize\inline_container.cc:132, please report a bug to PyTorch. Attempted to read a PyTorch file with version 3, but the maximum supported version for reading is 2. Your PyTorch installation may be too old. (init at ..\caffe2\serialize\inline_container.cc:132) (no backtrace available) 0%| | 0/1 [00:06<?, ?it/s] Current Source ==> majesticWoman Running depth extraction at 1670549950.8643239 BoostingMonocularDepth\inputs\*.jpg copy "D:\Development\3d-photo-inpainting\KenBurns\Input\majesticWoman.jpg" "D:\Development\3d-photo-inpainting\BoostingMonocularDepth\inputs\majesticWoman.jpg" Traceback (most recent call last): File "main.py", line 58, in <module> run_boostmonodepth(sample['ref_img_fi'], config['src_folder'], config['depth_folder']) File "D:\Development\3d-photo-inpainting\boostmonodepth_utils.py", line 46, in run_boostmonodepth depth = imageio.imread(os.path.join(BOOST_BASE, BOOST_OUTPUTS, tgt_name)) File "C:\ProgramData\Anaconda3\envs\3DP\lib\site-packages\imageio\__init__.py", line 97, in imread return imread_v2(uri, format=format, **kwargs) File "C:\ProgramData\Anaconda3\envs\3DP\lib\site-packages\imageio\v2.py", line 200, in imread with imopen(uri, "ri", **imopen_args) as file: File "C:\ProgramData\Anaconda3\envs\3DP\lib\site-packages\imageio\core\imopen.py", line 118, in imopen request = Request(uri, io_mode, format_hint=format_hint, extension=extension) File "C:\ProgramData\Anaconda3\envs\3DP\lib\site-packages\imageio\core\request.py", line 248, in __init__ self._parse_uri(uri) File "C:\ProgramData\Anaconda3\envs\3DP\lib\site-packages\imageio\core\request.py", line 407, in _parse_uri raise FileNotFoundError("No such file: '%s'" % fn) FileNotFoundError: No such file: 'D:\Development\3d-photo-inpainting\BoostingMonocularDepth\outputs\majesticWoman.png'

@donlinglok1
Copy link
Author

please report a bug to PyTorch. Attempted to read a PyTorch file with version 3, but the maximum supported version for reading is 2. Your PyTorch installation may be too old.

Hum, I didn't have that error message before, maybe this is some kind of dependencies version problem?

First you may checkout the dependencies version, here is my list
https://github.com/AUTOMATIC1111/stable-diffusion-webui/files/9945044/piplist.txt

Also some discussions here: AUTOMATIC1111/stable-diffusion-webui#4268 (reply in thread)

Then you may try on this colab or use the master branch code and see if your input image can work:
https://colab.research.google.com/drive/1DEySGgVdZtpdy3aP0xP8Sa4yvYTxxV_y?usp=sharing

https://github.com/donlinglok/3d-photo-inpainting/commits/master

@Straafe
Copy link

Straafe commented Apr 11, 2023

Got any ideas for this error? Tried several forks and versions of torch/cuda, can't seem to get around it on Windows


    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 2575: character maps to <undefined>

@donlinglok1 donlinglok1 closed this Apr 9, 2024
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

Successfully merging this pull request may close these issues.

3 participants