Fix Flux2 reference image mem estimation. (#10905)

This commit is contained in:
comfyanonymous 2025-11-25 23:36:19 -08:00 committed by GitHub
parent 90b3995ec8
commit 58b8574661
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -926,7 +926,7 @@ class Flux(BaseModel):
out = {} out = {}
ref_latents = kwargs.get("reference_latents", None) ref_latents = kwargs.get("reference_latents", None)
if ref_latents is not None: if ref_latents is not None:
out['ref_latents'] = list([1, 16, sum(map(lambda a: math.prod(a.size()), ref_latents)) // 16]) out['ref_latents'] = list([1, 16, sum(map(lambda a: math.prod(a.size()[2:]), ref_latents))])
return out return out
class Flux2(Flux): class Flux2(Flux):