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

Run out of input error #110

Open
Ashmit12092000 opened this issue Nov 22, 2023 · 7 comments
Open

Run out of input error #110

Ashmit12092000 opened this issue Nov 22, 2023 · 7 comments

Comments

@Ashmit12092000
Copy link

I'm using Windows OS and python version 3.8.10

FRAME RATE DETECTED: 25/1 (if this looks wrong, override the frame rate)
FRAME RATE: 25 TOTAL FRAMES: 523
WORKER 0 ONLINE
WORKER FRAMERIPPER ONLINE
Process Process-3:
Traceback (most recent call last):
File "D:\lib\multiprocessing\process.py", line 315, in _bootstrap
self.run()
File "D:\lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "D:\lib\site-packages\backgroundremover\utilities.py", line 29, in worker
net = Net(model_name)
File "D:\lib\site-packages\backgroundremover\bg.py", line 88, in init
net.load_state_dict(torch.load(path, map_location=torch.device(DEVICE)))
File "D:\lib\site-packages\torch\serialization.py", line 815, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "D:\lib\site-packages\torch\serialization.py", line 1033, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
EOFError: Ran out of input

@nadermx
Copy link
Owner

nadermx commented Dec 15, 2023

What was your innitial commmand?

@Sammyueru
Copy link

Sammyueru commented Dec 28, 2023

i got the same error:
backgroundremover -i "<input filename>.webm" -m "u2net" -tg -o "<output filename>.gif"

@JasonHug
Copy link

same error +1. python3.9.7 windows.
cmd:
backgroundremover -i "D:\1.jpeg" -m "u2net" -o "D:\2.png"

@vosalo
Copy link

vosalo commented Jan 22, 2024

Same error. I'm using Windows, Python version 3.9.

> backgroundremover -i o1.mp4 -mk -o kek.mp4

probing C:\x\o1.mp4
FRAME RATE DETECTED: 359/12 (if this looks wrong, override the frame rate)
FRAME RATE: 30 TOTAL FRAMES: 773
WORKER FRAMERIPPER ONLINE
WORKER 0 ONLINE
Process Process-3:
Traceback (most recent call last):
  File "C:\Users\x\AppData\Local\Programs\Python\Python39\lib\multiprocessing\process.py", line 315, in _bootstrap
    self.run()
  File "C:\Users\x\AppData\Local\Programs\Python\Python39\lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\x\AppData\Local\Programs\Python\Python39\lib\site-packages\backgroundremover\utilities.py", line 28, in worker
    net = Net(model_name)
  File "C:\Users\x\AppData\Local\Programs\Python\Python39\lib\site-packages\backgroundremover\bg.py", line 88, in __init__
    net.load_state_dict(torch.load(path, map_location=torch.device(DEVICE)))
  File "C:\Users\x\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\serialization.py", line 1028, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "C:\Users\x\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\serialization.py", line 1246, in _legacy_load
    magic_number = pickle_module.load(f, **pickle_load_args)
EOFError: Ran out of input

@vosalo
Copy link

vosalo commented Jan 22, 2024

It seems this error appears when torch tries to open an empty model. The program is loading u2net.pth which for some reason is empty, I suppose there is some problem with the automatic installation of u2net. I downloaded the hopefully correct file from https://github.com/xuebinqin/U-2-Net?tab=readme-ov-file and it works now.

@LeonadroW
Copy link

there's something with the default u2net model I think, and I just set model as "-m u2netp" to use it. model loading is fine this way.....but still have problems excuting a real cli [backgroundremover -i "aninput.mp4" -m "u2netp" -tg -o "anoutput.gif"]
just as this one #115

@nadermx
Copy link
Owner

nadermx commented Mar 3, 2024

So your saying it's not downloading the u2net model? What version of python?

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

6 participants