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

GPU Crash on VAE decoding - (Need TiledVAE) #1650

Closed
trolly056 opened this issue Mar 11, 2025 · 5 comments
Closed

GPU Crash on VAE decoding - (Need TiledVAE) #1650

trolly056 opened this issue Mar 11, 2025 · 5 comments

Comments

@trolly056
Copy link

trolly056 commented Mar 11, 2025

I use comfyui all the time no problems, but i always use Tiled-VAE because i cannot rely on comfy to switch when decoding the image, because it either lags my pc or crashes my gpu having me reboot.

So i use Tiled-VAE straight when using comfyui, but there's no such option when using KritaAI, unfortunately i learned by my screen going black and me having to reboot. Then to make sure i did the same thing but watching the ram and it goes over when doing the vae decoding. Please add TiledVAE as an option by default, ComfyUI has this, i can't rely on Comfy to switch to TiledVAE because it will not work.

Unless there's an option somewhere and i'm missing, i'm assuming you're leaving it to comfyui to make the switch if necessary, but in my case and perhaps others, that does not work.

I'm using the custom server option, because i'm on AMD using ZLUDA on Windows.
If anyone cares i'm using RX 7600 8GB, 12400f, 2x8gb ram

@Acly
Copy link
Owner

Acly commented Mar 11, 2025

Is this also an issue for initial (non upscaled) images in a 2-pass workflow, ie. resolution of max 1024x1024 (SDXL)?

Acly added a commit that referenced this issue Mar 11, 2025
@trolly056
Copy link
Author

trolly056 commented Mar 11, 2025

Is this also an issue for initial (non upscaled) images in a 2-pass workflow, ie. resolution of max 1024x1024 (SDXL)?

I wasn't upscaling anything, i was generating a simple 1216x832 image which is less ram than 1024x1024. Btw on normal comfyui when using tiled vae i can generate 1536x1536 and i can even use controlnets with it. All using the default comfy TiledVAE. And i've never gotten a GPU crash using tiled vae, it just crashes the comfyui if it's too much memory. I also use --fp8_e4m3fn-unet, but i assume since i'm in my custom server it preserves that, unfortunately i can't force TiledVAE from my end when using KritaAI.

Also, when i tried the second time to make sure it was the ram i used amd adrenalin and was monitoring the system ram, but i also closed everything else which i don't have to do when normally using comfyui with TiledVAE, i closed 2 browsers and Discord. Which i usually have open when using ComfyUI and sometimes even photoshop open as well, yet i can do all that i said above, but only using TiledVAE.
I can even upscale to 2048x2048 which i don't cuz i thought it was too slow and not worth it, so i stuck to 1.5 upscale instead. Which i do all the time.

@Acly
Copy link
Owner

Acly commented Mar 11, 2025

I was just wondering if it was okay to use regular VAE for the initial pass in a 2-pass gen, and tiled VAE only for the final decode. But if 1216x832 is already an issue the answer is probably no.

@minsky91
Copy link

I can also add, after long-time testing and timing of the plugin's work in various scenarios, an OOM at the VAE decode stage happens quite frequently. In the logs, it can be seen that It does fall back (retry) to the tiled decode, but fotentimes, this results in a much longer rendering time, especially - for some reason - when generating 2nd image in the batch. I tested the same workflow with tiled VAE encode/decode substituted and it always outperforms plugin at these stages, with no discernible loss of quality in the ouptut.

@trolly056
Copy link
Author

Closing the issue because TiledVAE was added, but i did create another issue as the problem still persists.

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

3 participants