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

ValueError: high is out of bounds for int32 #7

Open
TheCompAce opened this issue Jan 27, 2023 · 4 comments
Open

ValueError: high is out of bounds for int32 #7

TheCompAce opened this issue Jan 27, 2023 · 4 comments

Comments

@TheCompAce
Copy link

Just installed to test, but it is giving me the error...
Traceback (most recent call last):
File "T:\Tensorflow\Programs\depplearn\tools\Text2LIVE\train_image.py", line 129, in
train_model(config)
File "T:\Tensorflow\Programs\depplearn\tools\Text2LIVE\train_image.py", line 24, in train_model
seed = np.random.randint(2 ** 32)
File "mtrand.pyx", line 763, in numpy.random.mtrand.RandomState.randint
File "_bounded_integers.pyx", line 1336, in numpy.random._bounded_integers._rand_int32
ValueError: high is out of bounds for int32

@conneroisu
Copy link

Same error^
bit size for numpy defaults to 32 with this project(needs to be 64), but I don't know how to update this for the repository to contribute or I would.

@TheCompAce
Copy link
Author

TheCompAce commented Jan 27, 2023

I spent a little time looking this error up, it is happening on "np.random.seed(seed)" but I do not see where to change the 32 to 64 bit, but I am a noob when it comes to this kind of stuff. To get past this error I changed in the file "train_video.py" from ...
"seed = np.random.randint(2 ** 32)"
to
'seed = np.random.randint(2 ** 16)'

And it gets past that point but now get "AssertionError: Torch not compiled with CUDA enabled", but that is something I think I can figure out.

@Meatfucker
Copy link

Meatfucker commented Jan 27, 2023

This can be fixed by changing this line in train_video.py
seed = np.random.randint(2 ** 32)

to
seed = np.random.randint(2 ** 32, dtype=np.int64)

A similar line exists in train_image.py that can be solved with the same change. If unsure check the PR I made.

@TheCompAce
Copy link
Author

Thanks

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

3 participants