csslc / CCSR

Official codes of CCSR: Improving the Stability of Diffusion Models for Content Consistent Super-Resolution
https://csslc.github.io/project-CCSR/
436 stars 32 forks source link

Windows Deploy Python Environment Issue #28

Open Code-dogcreatior opened 3 months ago

Code-dogcreatior commented 3 months ago

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 commented 3 months ago

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