Text2LIVE icon indicating copy to clipboard operation
Text2LIVE copied to clipboard

ValueError: high is out of bounds for int32

Open TheCompAce opened this issue 2 years ago • 4 comments

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

TheCompAce avatar Jan 27 '23 17:01 TheCompAce

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.

connerohnesorge avatar Jan 27 '23 17:01 connerohnesorge

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.

TheCompAce avatar Jan 27 '23 17:01 TheCompAce

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.

Meatfucker avatar Jan 27 '23 23:01 Meatfucker

Thanks

TheCompAce avatar Jan 28 '23 07:01 TheCompAce