From 5e0936a7c1223e0d414c1f22034e82bce3092f67 Mon Sep 17 00:00:00 2001 From: liu_jn Date: Thu, 15 Jun 2023 17:51:52 +0800 Subject: [PATCH] fix:cbs variable undefined bug --- cldm/ddim_hacked.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cldm/ddim_hacked.py b/cldm/ddim_hacked.py index 25b1bc9472..7472e46578 100644 --- a/cldm/ddim_hacked.py +++ b/cldm/ddim_hacked.py @@ -87,6 +87,7 @@ def sample(self, elif isinstance(conditioning, list): for ctmp in conditioning: + cbs = ctmp.shape[0] if ctmp.shape[0] != batch_size: print(f"Warning: Got {cbs} conditionings but batch-size is {batch_size}")