Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Adjust memory usage factor calculation for flux2 klein. (#11900)

comfyanonymous4c816d5c698d
diff --git a/comfy/supported_models.py b/comfy/supported_models.py
index 2c4c6b8fc..c8a7f6efb 100644
--- a/comfy/supported_models.py
+++ b/comfy/supported_models.py
@@ -763,7 +763,7 @@ class Flux2(Flux):
def __init__(self, unet_config):
super().__init__(unet_config)
- self.memory_usage_factor = self.memory_usage_factor * (2.0 * 2.0) * 2.36
+ self.memory_usage_factor = self.memory_usage_factor * (2.0 * 2.0) * (unet_config['hidden_size'] / 2604)
def get_model(self, state_dict, prefix="", device=None):
out = model_base.Flux2(self, device=device)