Skip to content
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

Only using 65% of GPU memory #82

Open
tannercollin opened this issue Jul 21, 2022 · 6 comments
Open

Only using 65% of GPU memory #82

tannercollin opened this issue Jul 21, 2022 · 6 comments

Comments

@tannercollin
Copy link

tannercollin commented Jul 21, 2022

While running some benchmarks I noticed min-dalle was only using 65% of my 3070 Ti GPU's memory:

image

Here's the function I'm calling:

def run_dalle():
    generate_image(
        is_mega=True,
        text='rich ducks playing poker',
        seed=0,
        grid_size=3,
        top_k=256,
        image_path='generated',
        models_root='pretrained',
        fp16=True,
    )

After running it 50 times, each image takes 54.5 seconds on average to generate. It's running baremetal on 32x E5-2630 v3 threads and 64 GB RAM.

Is there a way to make it use more of the GPU? or am I reading this wrong? Thanks!

@tannercollin tannercollin changed the title Only using 53% of GPU Only using 65% of GPU memory Jul 21, 2022
@tannercollin
Copy link
Author

Also the GPU-Util field fluctuates between 0% and ~40%.

@78Alpha
Copy link

78Alpha commented Jul 27, 2022

Doesn't seem too off. I use the bfloat16 and get a usage of 41% with 7.7 GB/ 8 GB VRAM. That's with a 3070 (non-Ti)

EDIT:

The time, however seems a little strange, as I am at 11 seconds per image

@tannercollin
Copy link
Author

@78Alpha are you using the Mega model?

@78Alpha
Copy link

78Alpha commented Jul 31, 2022

@78Alpha are you using the Mega model?

The default for the pip package

EDIT:

Checking back, it is the Mega Version. Will also try non-mega...

Non-mega went to about 9 seconds per image

@tannercollin
Copy link
Author

tannercollin commented Aug 1, 2022

I'm surprised there's only two seconds difference. Note that mega defaults as off, so you have to pass --mega into the command line.

I was also getting around 10 seconds in the non-mega version.

@78Alpha
Copy link

78Alpha commented Aug 2, 2022

I had been using my own utility script for batch generation here

I have it set to is_mega=True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants