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

Added support for image generation up to 1024x1024 #214

Closed
wants to merge 2 commits into from
Closed

Added support for image generation up to 1024x1024 #214

wants to merge 2 commits into from

Conversation

thtmnisamnstr
Copy link

Added support for image generation up to 1024x1024. Reading through the comments on Issue #35, 1024x1024 seemed to be an acceptable upper bound while still generating good results (even though Stable Diffusion was trained on 512x512 images).

This was tested on a 2021 M1 MacBook Pro w/ 32GB RAM, and generating 1024x1024 images was no issue, but it is definitely slower the higher resolution you go.

Closes #35

@donuts-are-good
Copy link

I'm on an m2, 8gb and assumed this 1024 delay was swapping due to my lower memory (it takes hours as opposed to maybe a minute at 512, even when rendering 4 images). I had assumed the time to render scaled linearly unless consuming more than the allotted memory, which I tested by rendering smaller resolution in batches vs an equal amount of pixels in singular images.

@thtmnisamnstr
Copy link
Author

thtmnisamnstr commented Oct 20, 2022

@donuts-are-good

I had assumed the time to render scaled linearly ...

I think this assumption is incorrect. I haven't timed my renders, but I believe they scale exponentially. My use seems to align with this. My math might be off, but I think a 1024x1024 render would take 4x a 512x512 render.

One thing that might help with your situation is to do a low-resolution render for your first render after you open the app, and then do higher-resolution renders after the first render. I noticed some slowness on first renders that are especially pronounced with higher resolutions when I was making these changes, and it looks like GPU acceleration doesn't always enable on the first render but is always enabled on subsequent renders. I just validated this on the current release (first render for 512x512 took 36s, 2nd render took 27s).

To be 100% honest, the primary issue may be the RAM you're working with. I'm running 32GB and you're running 8GB. It's a significant difference.

@arunavo4
Copy link

@thtmnisamnstr Can you try 2048x2048?

@impallari
Copy link

I just downloaded the mac app version from https://diffusionbee.com/ and I can only do 768px images.
Do you know when it will be updated? or is there any other way I can hack it to start using bigger images?

Maybe the best way is to leave it up to de user to input whatever image size one may want, for example rectangular images instead of squared ones..

I know this can get non tech-savvy users into problems, so maybe it can be something like an advanced setting like the one for custom models.

@impallari
Copy link

Hi @thtmnisamnstr thtmnisamnstr
Is there a compiled version I can download to use 1024x1024?
Thanks!

@thtmnisamnstr thtmnisamnstr closed this by deleting the head repository Apr 1, 2024
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

Successfully merging this pull request may close these issues.

Can the resolution be higher? For example 1280*768
4 participants