Skip to content

Commit 58b8574

Browse files
Fix Flux2 reference image mem estimation. (#10905)
1 parent 90b3995 commit 58b8574

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

comfy/model_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ def extra_conds_shapes(self, **kwargs):
926926
out = {}
927927
ref_latents = kwargs.get("reference_latents", None)
928928
if ref_latents is not None:
929-
out['ref_latents'] = list([1, 16, sum(map(lambda a: math.prod(a.size()), ref_latents)) // 16])
929+
out['ref_latents'] = list([1, 16, sum(map(lambda a: math.prod(a.size()[2:]), ref_latents))])
930930
return out
931931

932932
class Flux2(Flux):

0 commit comments

Comments
 (0)