Fixed issue with interleaving when doing cfg

This commit is contained in:
Jaret Burkett committed 2023-09-10 10:26:58 -06:00
1 parent a437aed45f
commit 708b07adb7
1 file changed
+1 -1
+1 -1
View File
@@ -131,7 +131,7 @@ class ToolkitModuleMixin:
lora_output_batch_size = lora_output.size(0) lora_output_batch_size = lora_output.size(0)
multiplier_batch_size = multiplier.size(0) multiplier_batch_size = multiplier.size(0)
if lora_output_batch_size != multiplier_batch_size: if lora_output_batch_size != multiplier_batch_size:
num_interleaves = (lora_output_batch_size // 2) // multiplier_batch_size num_interleaves = lora_output_batch_size // multiplier_batch_size
multiplier = multiplier.repeat_interleave(num_interleaves) multiplier = multiplier.repeat_interleave(num_interleaves)
# multiplier = 1.0 # multiplier = 1.0