VectorSpaceLab / OmniGen

OmniGen: Unified Image Generation. https://arxiv.org/pdf/2409.11340
MIT License
2.89k stars 228 forks source link

RuntimeError: OffloadedCache can only be used with a GPU - With AMD #115

Open dazpants1 opened 2 weeks ago

dazpants1 commented 2 weeks ago

Hi,

I'm a noob to all this and i keep getting the below error.

RuntimeError: OffloadedCache can only be used with a GPU.

I am using an AMD CPU and an AMD GPU. Does this only work with Nvidia or do i need to do something else?

Any guidance would really be appreciated.

Thanks

Darren

staoxiao commented 2 weeks ago

Hi, @dazpants1, I'm sorry, the current code only supports Nvidia CUDA. We don't know how to adapt it for AMD.

dazpants1 commented 2 weeks ago

Hi @staoxiao ,

No problem i thought it might be something like that. My own fault for changing from Nvidia after all these years just before i discovered the wonferful world of AI goodies. lol. Thank you for confirming. Have a lovely day.

Thanks

Darren

ElaineCordero commented 2 weeks ago

Is there a workaround for this? like using only the cpu??

Hokman commented 1 week ago

I have an AMD CPU and Nvida GPU... it is saying I don't have a GPU intalled is this the same reason at OP?

staoxiao commented 1 week ago

@Hokman, you can check whether the cuda is installed correctly bytorch.cuda.is_available(). Here is an example to install cuda:

# Create a python 3.10.13 conda env (you could also use virtualenv)
conda create -n omnigen python=3.10.13
conda activate omnigen

# Install pytorch with your CUDA version, e.g.
pip install torch==2.3.1+cu118 torchvision --extra-index-url https://download.pytorch.org/whl/cu118

git clone https://github.com/VectorSpaceLab/OmniGen.git
cd OmniGen
pip install -e .