You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After setting up the development environment for Meteor Lake, trying to run npm run dev fails.
The error is caused by basicsr, which is using a deprecated import for functional tensor at basicsr/data/degradations.py.:
# Current:
from torchvision.transforms.functional_tensor import rgb_to_grayscale
# Replace:
from torchvision.transforms.functional import rgb_to_grayscale
A workaround is to edit basicsr so it uses the right import statement. The following links provides context for such change:
After you change it, the development environment starts fine.
To Reproduce
Steps to reproduce the behavior:
Start the development environment
Run npm run dev
Expected behavior
Development environment should start
Screenshots
The error log is the following:
[electron-backend]: load url:http://localhost:25413/
[electron-backend]: #1 try to start python API
[17052:1001/145301.880:ERROR:CONSOLE(1)] "Request Autofill.enable failed. {"code":-32601,"message":"'Autofill.enable' wasn't found"}", source: devtools://devtools/bundled/core/protocol_client/protocol_client.js (1)
[17052:1001/145301.880:ERROR:CONSOLE(1)] "Request Autofill.setAddresses failed. {"code":-32601,"message":"'Autofill.setAddresses' wasn't found"}", source: devtools://devtools/bundled/core/protocol_client/protocol_client.js (1)
[ai-backend]: C:\Users\Nicolas Oliver\Downloads\AI-Playground\env\lib\site-packages\transformers\deepspeed.py:23: FutureWarning: transformers.deepspeed module is deprecated and will be removed in a future version. Please import deepspeed modules directly from transformers.integrations
warnings.warn(
[ai-backend]: C:\Users\Nicolas Oliver\Downloads\AI-Playground\env\lib\site-packages\torchvision\io\image.py:13: UserWarning: Failed to load image Python extension: 'Could not find module 'C:\Users\Nicolas Oliver\.conda\envs\aipg_xpu\Lib\site-packages\torchvision\image.pyd' (or one of its dependencies). Try using the full path with constructor syntax.'If you don't plan on using image functionality from `torchvision.io`, you can ignore this warning. Otherwise, there might be something wrong with your environment. Did you have `libjpeg` or `libpng` installed before building `torchvision` from source?
warn(
[ai-backend]: 2024-10-01 14:53:06,706 - INFO - intel_extension_for_pytorch auto imported
[ai-backend]: Traceback (most recent call last):
File "C:\Users\Nicolas Oliver\Downloads\AI-Playground\service\web_api.py", line 6, in <module>
from sd_adapter import SD_SSE_Adapter
File "C:\Users\Nicolas Oliver\Downloads\AI-Playground\env\lib\site-packages\ipex_llm\utils\ipex_importer.py", line 76, in custom_ipex_import
[ai-backend]: return RAW_IMPORT(name, globals, locals, fromlist, level)
File "C:\Users\Nicolas Oliver\Downloads\AI-Playground\service\sd_adapter.py", line 7, in <module>
import paint_biz
File "C:\Users\Nicolas Oliver\Downloads\AI-Playground\env\lib\site-packages\ipex_llm\utils\ipex_importer.py", line 80, in custom_ipex_import
return RAW_IMPORT(name, globals, locals, fromlist, level)
File "C:\Users\Nicolas Oliver\Downloads\AI-Playground\service\paint_biz.py", line 28, in <module>
from realesrgan import RealESRGANer
File "C:\Users\Nicolas Oliver\Downloads\AI-Playground\env\lib\site-packages\ipex_llm\utils\ipex_importer.py", line 76, in custom_ipex_import
return RAW_IMPORT(name, globals, locals, fromlist, level)
File "C:\Users\Nicolas Oliver\Downloads\AI-Playground\service\realesrgan.py", line 11, in <module>
from basicsr.archs.rrdbnet_arch import RRDBNet
File "C:\Users\Nicolas Oliver\Downloads\AI-Playground\env\lib\site-packages\ipex_llm\utils\ipex_importer.py", line 76, in custom_ipex_import
return RAW_IMPORT(name, globals, locals, fromlist, level)
File "C:\Users\Nicolas Oliver\Downloads\AI-Playground\env\lib\site-packages\basicsr\__init__.py", line 4, in <module>
from .data import *
File "C:\Users\Nicolas Oliver\Downloads\AI-Playground\env\lib\site-packages\ipex_llm\utils\ipex_importer.py", line 76, in custom_ipex_import
return RAW_IMPORT(name, globals, locals, fromlist, level)
File "C:\Users\Nicolas Oliver\Downloads\AI-Playground\env\lib\site-packages\basicsr\data\__init__.py", line 22, in <module>
_dataset_modules = [importlib.import_module(f'basicsr.data.{file_name}') for file_name in dataset_filenames]
File "C:\Users\Nicolas Oliver\Downloads\AI-Playground\env\lib\site-packages\basicsr\data\__init__.py", line 22, in <listcomp>
[ai-backend]: _dataset_modules = [importlib.import_module(f'basicsr.data.{file_name}') for file_name in dataset_filenames]
File "C:\Users\Nicolas Oliver\Downloads\AI-Playground\env\lib\importlib\__init__.py", line 126, in import_module
[ai-backend]: return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\Nicolas Oliver\Downloads\AI-Playground\env\lib\site-packages\basicsr\data\realesrgan_dataset.py", line 11, in <module>
[ai-backend]: from basicsr.data.degradations import circular_lowpass_kernel, random_mixed_kernels
File "C:\Users\Nicolas Oliver\Downloads\AI-Playground\env\lib\site-packages\ipex_llm\utils\ipex_importer.py", line 76, in custom_ipex_import
return RAW_IMPORT(name, globals, locals, fromlist, level)
File "C:\Users\Nicolas Oliver\Downloads\AI-Playground\env\lib\site-packages\basicsr\data\degradations.py", line 8, in <module>
from torchvision.transforms.functional_tensor import rgb_to_grayscale
File "C:\Users\Nicolas Oliver\Downloads\AI-Playground\env\lib\site-packages\ipex_llm\utils\ipex_importer.py", line 76, in custom_ipex_import
return RAW_IMPORT(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor'
[electron-backend]: Error: Process exited with code 1
Environment (please complete the following information):
Describe the bug
After setting up the development environment for Meteor Lake, trying to run
npm run dev
fails.The error is caused by basicsr, which is using a deprecated import for functional tensor at
basicsr/data/degradations.py.
:A workaround is to edit basicsr so it uses the right import statement. The following links provides context for such change:
pytorch/vision#7269
TencentARC/GFPGAN#539
XPixelGroup/BasicSR#699
After you change it, the development environment starts fine.
To Reproduce
Steps to reproduce the behavior:
npm run dev
Expected behavior
Development environment should start
Screenshots
The error log is the following:
Environment (please complete the following information):
Additional context
This is the continuation for #69.
The text was updated successfully, but these errors were encountered: