CCSR icon indicating copy to clipboard operation
CCSR copied to clipboard

Windows Deploy Python Environment Issue

Open Code-dogcreatior opened this issue 1 year ago • 3 comments

Code-dogcreatior avatar Jun 25 '24 08:06 Code-dogcreatior

I want to deploy this to a Windows system, but my common compilation version for Tirton is only Python 3.10. Also, does Torch require a GPU version? Do you have any recommended and direct instructions for installing Windows versions? Also, I would like to ask the author about how much memory is typically used for 256x256 images when enlarged by 4x (other settings default and do not use ccsr_tile)?

Code-dogcreatior avatar Jun 25 '24 08:06 Code-dogcreatior

PS E:\image\CCSR> & D:/Anaconda/envs/ccsr/python.exe e:/image/CCSR/gradio_ccsr.py

A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.0 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2' or try to upgrade the affected module. We expect that some modules will need time to support NumPy 2.

Traceback (most recent call last): File "e:\image\CCSR\gradio_ccsr.py", line 8, in import pytorch_lightning as pl File "D:\Anaconda\envs\ccsr\lib\site-packages\pytorch_lightning_init_.py", line 27, in from pytorch_lightning.callbacks import Callback # noqa: E402 File "D:\Anaconda\envs\ccsr\lib\site-packages\pytorch_lightning\callbacks_init_.py", line 14, in from pytorch_lightning.callbacks.batch_size_finder import BatchSizeFinder File "D:\Anaconda\envs\ccsr\lib\site-packages\pytorch_lightning\callbacks\batch_size_finder.py", line 26, in from pytorch_lightning.callbacks.callback import Callback File "D:\Anaconda\envs\ccsr\lib\site-packages\pytorch_lightning\callbacks\callback.py", line 22, in from pytorch_lightning.utilities.types import STEP_OUTPUT File "D:\Anaconda\envs\ccsr\lib\site-packages\pytorch_lightning\utilities\types.py", line 42, in from torchmetrics import Metric File "D:\Anaconda\envs\ccsr\lib\site-packages\torchmetrics_init_.py", line 26, in from torchmetrics import functional # noqa: E402 File "D:\Anaconda\envs\ccsr\lib\site-packages\torchmetrics\functional_init_.py", line 122, in from torchmetrics.functional.text._deprecated import bleu_score as bleu_score File "D:\Anaconda\envs\ccsr\lib\site-packages\torchmetrics\functional\text_init.py", line 17, in from torchmetrics.functional.text.chrf import chrf_score File "D:\Anaconda\envs\ccsr\lib\site-packages\torchmetrics\functional\text\chrf.py", line 44, in _EPS_SMOOTHING = tensor(1e-16) D:\Anaconda\envs\ccsr\lib\site-packages\torchmetrics\functional\text\chrf.py:44: UserWarning: Failed to initialize NumPy: _ARRAY_API not found (Triggered internally at ..\torch\csrc\utils\tensor_numpy.cpp:84.) EPS_SMOOTHING = tensor(1e-16) WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for: PyTorch 2.0.1+cu118 with CUDA 1108 (you have 2.0.1+cpu) Python 3.10.11 (you have 3.10.11) Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers) Memory-efficient attention, SwiGLU, sparse and more won't be available. Set XFORMERS_MORE_DETAILS=1 for more details Traceback (most recent call last): File "e:\image\CCSR\gradio_ccsr.py", line 15, in from model.q_sampler import SpacedSampler File "e:\image\CCSR\model\q_sampler.py", line 11, in from utils.image import ( File "e:\image\CCSR\utils\image_init.py", line 1, in from .diffjpeg import DiffJPEG File "e:\image\CCSR\utils\image\diffjpeg.py", line 20, in y_table = nn.Parameter(torch.from_numpy(y_table)) RuntimeError: Numpy is not available

Code-dogcreatior avatar Jun 25 '24 08:06 Code-dogcreatior

From the error message, it seems that CUDA is not being used. Could you provide your CUDA version?

csslc avatar Dec 12 '24 04:12 csslc