Uh oh!
There was an error while loading. Please reload this page.
[BREAKING FIX] [torchvision 0.17] Change functional_tensor import - #650
Conversation
| from scipy import special | ||
| from scipy.stats import multivariate_normal | ||
| from torchvision.transforms.functional_tensor import rgb_to_grayscale | ||
| from torchvision.transforms.functional import rgb_to_grayscale |
There was a problem hiding this comment.
This would not be a breaking change if you try both imports:
| fromtorchvision.transforms.functionalimportrgb_to_grayscale | |
| try: | |
| fromtorchvision.transforms.functionalimportrgb_to_grayscale | |
| exceptImportError: | |
| fromtorchvision.transforms.functional_tensorimportrgb_to_grayscale |
There was a problem hiding this comment.
this will work--
try:
from torchvision.transforms.functional import rgb_to_grayscale
except ImportError:
from torchvision.transforms.functional_tensor import rgb_to_grayscale
psychedelicious
commented
Feb 2, 2024
|
yemreck
commented
Apr 2, 2024
can we merge it? 2 months since 0.17 released. |
psychedelicious
commented
Apr 2, 2024
Over at Invoke, we only use the RealESRGAN functionality provided by I extracted the relevant classes and cleaned them up a bit: Maybe this is useful for others who only use this library for upscaling and would like to keep their other dependencies up to date. |
The Spandrel project by the chaiNNer folks (disclaimer: I'm a contributor, and I also wired Spandrel up into a1111 in AUTOMATIC1111/stable-diffusion-webui#14425) implements RealESRGAN and various other upscaling and enhancement models in a clean way. |
psychedelicious
commented
Apr 2, 2024
Thanks for the link @akx ! This looks like a very ergonomic API, great work. Much nicer than what the basicsr repo provides (and my extracted version of it). |
yulin-li
commented
Jul 19, 2024
could we release a new version with this fix? |
blucz
commented
Oct 1, 2024
This bug continues to cause many users of downstream packages to manually hack up the basicsr code to get things to run, despite being fixed in Is it possible for whoever controls the PyPI packaging to push the build button and release a new version? |
n0kovo
commented
Nov 12, 2024
aminakmim
commented
Jan 20, 2025
Why this change is not appearing in PyPI package ? |
warning: pypi package is not successfully pubilished |
I released a fixed version to address this issue. Use |
Fix for #649