VectorSpaceLab / OmniGen

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

Multiple GPU devices #140

Open initcold opened 2 days ago

initcold commented 2 days ago

My linux 2 GPU setup, defaults to gpu0 for connecting to monitor.

When Omnigen ran, it defaults to gpu0, which causes an OutOfMemory (yes, as all other stuff also is in gpu) I have not found way to force omnigen to gpu1, except for hacking the code (thanks to AI)

I have edited pipeline.py

            self.device = torch.device("cuda")

changed into self.device = torch.device("cuda:1")

Would be nice if this could be parameterized.