keeep running out of memory but it works SOMETIMES

#147
by AmazingTy - opened

guys there has to be a fix for it, sometimes i run out of memory and i cant generate then i click run again and then it works it even generates at like 20 seconds its insane, any way i can stop it form crashing i got a 3070 rtx with 8gbvram. it works sometimes and sometimes it just crashes or gives me blue screen of death and i have to restart

addition: i get the textencodeqwenimageeditplus OOM out of memory error, if i immediately click run it then runs fully and gives great results. how can i change this ?

textencodeqwenimageeditplus

allocation on device
this error means you ran out of memory on your gpu
tips if this workflow worked before you might have accidentally set the batch_size to a large number (which i didnt its at 1)

torch.OutOfMemoryError: Allocation on device

Got an OOM, unloading all loaded models.
Prompt executed in 76.59 seconds

same with me after the model be combined with BF16 models, the maybe from version 8, Version 5 is still the one best for me, i already told Phr00t before regarding this.

This comment has been hidden (marked as Off-Topic)

same with me after the model be combined with BF16 models, the maybe from version 8, Version 5 is still the one best for me, i already told Phr00t before regarding this.

have you found anything that reduces it or fixes it?

I also ran out of memory on a 5070 with the v11.1 model. I was able to do 1 gen with phr00ts workflow and that was it. OOM every other time now. Trying to see if I can use his 11.1 model someone quantized and made a gguf but working on clip and vae loaders.

Alright so I got it to stop going OOM on a 5070 12gb. Using Phr00ts workflow (https://huggingface.co/Phr00t/Qwen-Image-Edit-Rapid-AIO/blob/main/Qwen-Rapid-AIO.json) I removed that checkpoint loader, grabbed an updated comfyui-gguf unet loader, loaded the Q8 quantized GGUF (https://huggingface.co/Arunk25/Qwen-Image-Edit-Rapid-AIO-GGUF/tree/main/v11.1) used a separate loader on the vae (https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/tree/main/split_files/vae) and the fp8 text encoder here (https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/tree/main/split_files/text_encoders).

No more OOM. Up the steps a bit to 7 because the default workflow has it at 4 and with a quantized model you'll get artifacting on low steps.

Hope this helps!

V5.2. I'm responsible for saying it's the best at the moment.

as an update to what I said earlier dont use that vae, use pigs (https://huggingface.co/calcuis/pig-vae/blob/main/pig_qwen_image_vae_fp32-f16.gguf) and get the gguf comfyui nodes to load the gguf vae. Then grab Phils Q4 clip gguf & Q8 mmproj and put those in the clip folder (https://huggingface.co/Phil2Sat/Qwen-Image-Edit-Rapid-AIO-GGUF/tree/main/Qwen2.5-VL-7B-Instruct-abliterated) then load with gguf clip loader. This will work on 12g vram.

Also Ming is right v 5.2 has better consistency.

guys there has to be a fix for it, sometimes i run out of memory and i cant generate then i click run again and then it works it even generates at like 20 seconds its insane, any way i can stop it form crashing i got a 3070 rtx with 8gbvram. it works sometimes and sometimes it just crashes or gives me blue screen of death and i have to restart

use VAE Decode (Tiled) and all issues are gone.

use VAE Decode (Tiled) and all issues are gone.

Note that it's slower and lossy a bit

remove loras, controlnets etc.
or get a 4060Ti/5060Ti 16GB...the cheapest entry-level AI graphics cards.

or get a 4060Ti/5060Ti 16GB...the cheapest entry-level AI graphics cards.

There are weaker GPUs capable of running Qwen Image

or get a 4060Ti/5060Ti 16GB...the cheapest entry-level AI graphics cards.

There are weaker GPUs capable of running Qwen Image

"cheapest entry-level" :)
richman doesnt need them, just get a H100

V5.2. I'm responsible for saying it's the best at the moment.

Could you share what's the differences between V5.0 and V5.2? what get improved after update V5.0 to V5.2? thanks

guys there has to be a fix for it, sometimes i run out of memory and i cant generate then i click run again and then it works it even generates at like 20 seconds its insane, any way i can stop it form crashing i got a 3070 rtx with 8gbvram. it works sometimes and sometimes it just crashes or gives me blue screen of death and i have to restart

use VAE Decode (Tiled) and all issues are gone.

that sadly does not work because the issue that i get is coming from TextEncodeQwenImageEditPlus, i dont have issues making the actual image i always happens from the qwen encode when i write a new prompt. after the error message i just run it again and then it works so yeah i think its a weird other bug.

guys there has to be a fix for it, sometimes i run out of memory and i cant generate then i click run again and then it works it even generates at like 20 seconds its insane, any way i can stop it form crashing i got a 3070 rtx with 8gbvram. it works sometimes and sometimes it just crashes or gives me blue screen of death and i have to restart

use VAE Decode (Tiled) and all issues are gone.

that sadly does not work because the issue that i get is coming from TextEncodeQwenImageEditPlus, i dont have issues making the actual image i always happens from the qwen encode when i write a new prompt. after the error message i just run it again and then it works so yeah i think its a weird other bug.

exactly the same issue as my

Sign up or log in to comment