-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Bug] #1993
Comments
Hey @mycomedico, I found some similar question in stackoverflow. Can you try running |
I found that stackoverflow thread before i posted this and tried it lol. made no difference. |
Does the same error occur when you |
OK, this seems a MMagic's problem. I'll debug and fix this as soon as possible. |
lmk however i can help, if you need to remote in or something. going to bed now but will be available any evening, cheers |
@mycomedico, I made some potential relevant error fixing in #1995. You can pull the latest main branch to see if the errors still exist. |
I won't be able to test this till tomorrow. I was testing mmagic today on my laptop instead of desktop and one thing I realized was that installing accelerate via |
OK, I just got a chance to try and do a fresh install of magic, which went well as I didn't see any errors, but I'm still not able to do the quick run example. In a python shell. the first import statement is accepted, but the second command to create an object fails:
pip install albumentations seems to solve this |
ok it seems to work, but i did get some warnings as follows:
|
So, everything was working well for inferencing on a stable diffusion model, but when I tried to run a more challeging task of video super resolution I received a HIP memory error. I read a lot of message forums and it seems the best solution for an AMD cpu encountering this error is to basically run a docker image of pytorch specifically configured to run with amds cuda alternative software rocm. I am now running the docker image but having problems with installing mmagic. It seems one big error I get when trying to install mmcv is that my gcc compiler is not appropriate. For example, when building wheeels for mmcv i get this error here: I don't understand why im getting this error b/c i upgraded to the latest gcc, any advice? |
a lot of the errors in the log look like this as well:
|
I was just able to install mmagic, by only installing mmcvlight and then using pip to install mmagic instead of mim, but unfortunately it doesn't seem to work without full mmcv, this is what i get when trying to import from apis: (mmagic) root@60de6dc11764:~# python
|
I just found this! https://www.linkedin.com/pulse/running-ml-inference-amd-gpu-rocm-part-ii-luxoft-serbia These guys had the same exact issues that I'm having and had to circumvent use of mmvc by porting the model code to another computer with nvidia first. any idea when mmvc will offer support for rocm? |
I just tried compiling mmvc from source using the following options: Successfully preprocessed all matching files. The above exception was the direct cause of the following exception: Traceback (most recent call last): |
it seems part of the problem here is that these modules require using c++17 to compile but instead is trying to compile with c++14, so i edited setup.py to force the use of c++17, unfortunately it did not work and still getting the same errors :( should i post this all in mmcv instead? |
Sorry for late reponse. Can you try to add path of c++17 to your environment variable instead of changing |
i'm sorry i'm not exactly sure how to do that. is that something i set in my bash shell? can you tell me explicitly what to do? thanks! |
For example, if you want to add export PATH=${GCC_HOME}/bin:$PATH |
I tried what you are suggesting and now get a new permissions type error. I tried overcoming the permissions error by running the compile as sudo, but in that case mmcv did not then seem available to my user account. Here is the permissions error I get now when trying to compile mmcv as user: Total number of replaced kernel launches: 182 The following error occurred while trying to add or remove files in the
The installation directory you specified (via --install-dir, --prefix, or
Perhaps your account does not have write access to this directory? If the For information on other options, you may wish to consult the https://setuptools.pypa.io/en/latest/deprecated/easy_install.html Please make the appropriate changes for your system and try again. |
Prerequisite
Task
I'm using the official example scripts/configs for the officially supported tasks/models/datasets.
Branch
main branch https://github.com/open-mmlab/mmagic
Environment
My GPU is an AMD Radeon 6600, which means i needed to install pytorch with rocm in order to use it. I installed in conda environment with pip:
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.4.2
The rest I installed as per mmagic installation instructions:
conda install cudatoolkit=11.3 -c pytorch
mim install 'mmcv>=2.0.0'
mim install 'mmengine'
mim install 'mmagic'
The first time I tried running the quick run script from the command line and got the error:
python: can't open file 'demo/mmagic_inference_demo.py'
so, I then tried running from inside a python shell, which worked even though I got a bunch of errors. here is a screenshot of my terminal:
Now trying to run it again from either the shell or command line it won't work at all, attached is a pic of my terminal errors:
Reproduces the problem - code sample
from mmagic.apis import MMagicInferencer
Reproduces the problem - command or script
from mmagic.apis import MMagicInferencer
Reproduces the problem - error message
Additional information
No response
The text was updated successfully, but these errors were encountered: