-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Errors related to the generated image #55
Comments
Is your pickle trained on greyscale or RGB images? |
thanks for your hints. My training set data is grayscale images, and I modified the way the images are saved in the generation code. It can be run. |
@wry123456 |
|
FWIW, I also has to change the "RGB" string in the (original) line 121 to "L" for it to work. |
The following error occurred when generating images with self-trained pkl files:
python generate.py --outdir outt --seeds 0-50 --network ./00005-data-auto2/network-snapshot-000600.pkl
Traceback (most recent call last):
File "generate.py", line 127, in
generate_images() # pylint: disable=no-value-for-parameter
File "/mistgpu/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/mistgpu/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/mistgpu/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/mistgpu/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/mistgpu/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "generate.py", line 121, in generate_images
PIL.Image.fromarray(img[0].cpu().numpy(), 'RGB').save(f'{outdir}/seed{seed:04d}.png')
File "/usr/local/lib/python3.6/dist-packages/PIL/Image.py", line 2785, in fromarray
return frombuffer(mode, size, obj, "raw", rawmode, 0, 1)
File "/usr/local/lib/python3.6/dist-packages/PIL/Image.py", line 2725, in frombuffer
return frombytes(mode, size, data, decoder_name, args)
File "/usr/local/lib/python3.6/dist-packages/PIL/Image.py", line 2671, in frombytes
im.frombytes(data, decoder_name, args)
File "/usr/local/lib/python3.6/dist-packages/PIL/Image.py", line 800, in frombytes
raise ValueError("not enough image data")
ValueError: not enough image data
What caused the above reasons?
The text was updated successfully, but these errors were encountered: