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

texturize enhance: pic should be PIL Image or ndarray #47

Open
terrainer opened this issue Oct 7, 2023 · 0 comments
Open

texturize enhance: pic should be PIL Image or ndarray #47

terrainer opened this issue Oct 7, 2023 · 0 comments

Comments

@terrainer
Copy link

terrainer commented Oct 7, 2023

Full traceback:
Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "C:\tools\miniconda3\envs\texturize\Scripts\texturize.exe\__main__.py", line 7, in <module> File "C:\tools\miniconda3\envs\texturize\Lib\site-packages\texturize\__main__.py", line 154, in main cmd = commands.Enhance(target_arr, source_arr, zoom=zoom) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\miniconda3\envs\texturize\Lib\site-packages\texturize\commands.py", line 105, in __init__ self.target = load_tensor_from_image(target, device="cpu") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\tools\miniconda3\envs\texturize\Lib\site-packages\texturize\io.py", line 58, in load_tensor_from_image return V.to_tensor(image).unsqueeze(0).to(device, dtype) ^^^^^^^^^^^^^^^^^^ File "C:\tools\miniconda3\envs\texturize\Lib\site-packages\torchvision\transforms\functional.py", line 140, in to_tensor raise TypeError(f"pic should be PIL Image or ndarray. Got {type(pic)}") TypeError: pic should be PIL Image or ndarray. Got <class 'tuple'>

Getting this when trying to use the enhance command with two RGB, 8 bits-per-channel, PNG files. Unsure what I'm doing wrong.
Command used: texturize enhance tests/lowres.png with tests/highres.png --zoom=4

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

1 participant