Skip to content

Flux.2[Klein-4b] using extremely high VRAM (Overflow) #11913

Description

@Kranos555

Custom Node Testing

Your question

Updated comfyui(portable) to the latest version(0.9.2) to try out Flux.2 klein 4b but during inference it completely fills up my Vram (4gb) spilling into the shared gpu memory making the generations really sloow.
For record other models like Z-image-turbo, Qwen-image, Wan 2.2 and even LTX-2 runs perfectly fine without overflowing out from the available vram.

You guys are already doing a great job with memory management and it would be really helpful if a solution for this can be found.
Thanks..

Logs

Using pytorch attention in VAE
Using pytorch attention in VAE
VAE load device: cuda:0, offload device: cpu, dtype: torch.float32
gguf qtypes: F32 (145), Q6_K (1), Q2_K (144), Q3_K (72), Q4_K (36)
Dequantizing token_embd.weight to prevent runtime OOM.
Requested to load Flux2TEModel_
loaded completely;  2024.07 MB loaded, full load: True
CLIP/text encoder model load device: cpu, offload device: cpu, current: cpu, dtype: torch.float16
Requested to load Flux2TEModel_
gguf qtypes: F32 (60), Q6_K (30), Q5_K (50), BF16 (9)
model weight dtype torch.bfloat16, manual cast: torch.float32
model_type FLUX
Potential memory leak detected with model Flux2TEModel_, doing a full garbage collect, for maximum performance avoid circular references in the model code.
Requested to load Flux2
0 models unloaded.
loaded partially; 0.00 MB usable, 0.00 MB loaded, 3038.95 MB offloaded, 822.45 MB buffer reserved, lowvram patches: 0
  0%|                                                                                            | 0/4 [00:00<?, ?it/s]

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    User SupportA user needs help with something, probably not a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions