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

torch2trt import error #17

Open
Senkai350 opened this issue May 26, 2024 · 1 comment
Open

torch2trt import error #17

Senkai350 opened this issue May 26, 2024 · 1 comment

Comments

@Senkai350
Copy link


TensorRT weight Generator will process the image with height 720 and width 1280 
Traceback (most recent call last):
  File "/Project/FAST_Anime_VSR/main.py", line 107, in <module>
    main()
  File "/Project/FAST_Anime_VSR/main.py", line 97, in main
    parallel_process(input_path, output_path, parallel_num=configuration.process_num)
  File "/Project/FAST_Anime_VSR/process/single_video.py", line 212, in parallel_process
    model_full_name, model_partition_name = weight_justify(configuration, input_path)
  File "/Project/FAST_Anime_VSR/process/single_video.py", line 92, in weight_justify
    generate_weight(h, w)               # It will automatically read model name we need
  File "/Project/FAST_Anime_VSR/tensorrt_weight_generator/weight_generator.py", line 257, in generate_weight
    tensorrt_transform_execute(lr_h, lr_width)
  File "/Project/FAST_Anime_VSR/tensorrt_weight_generator/weight_generator.py", line 206, in tensorrt_transform_execute
    ins.run()
  File "/Project/FAST_Anime_VSR/tensorrt_weight_generator/weight_generator.py", line 160, in run
    self.weight_generate()
  File "/Project/FAST_Anime_VSR/tensorrt_weight_generator/weight_generator.py", line 145, in weight_generate
    self.model_weight_transform(self.sample_input)
  File "/Project/FAST_Anime_VSR/tensorrt_weight_generator/weight_generator.py", line 92, in model_weight_transform
    from Real_ESRGAN.rrdb import RRDBNet
  File "/Project/FAST_Anime_VSR/Real_ESRGAN/rrdb.py", line 16, in <module>
    import Real_ESRGAN.torch2trt_fix    # For the bug override, don't delete it
  File "/Project/FAST_Anime_VSR/Real_ESRGAN/torch2trt_fix.py", line 4, in <module>
    from torch2trt.module_test import add_module_test
ModuleNotFoundError: No module named 'torch2trt.module_test'

i got this error on latest version

@My12123
Copy link
Contributor

My12123 commented Dec 20, 2024

To solve the problem with the ModuleNotFoundError: No module named 'torch2trt.module_test' error in the torch2trt project, you can try the following:
Check the installation. Make sure that the torch2trt module is installed correctly. To do this, run the pip list command and check whether torch2trt is listed among the installed packages. If not, reinstall it using the pip install torch2trt command.
Check the environment. Make sure that the code runs in the correct environment where torch2trt is installed. Different environments, such as virtual or conda, can have separate installations. You can check the list of installed packages in the environment by using the pip list or conda list commands.

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

2 participants