Fixe a variable that could nt be declared when doing blank prompt preservation

This commit is contained in:
Jaret Burkett committed 2025-10-23 16:19:56 -06:00
1 parent ee206cfa18
commit 80418209b8
1 file changed
+1 -1
+1 -1
View File
@@ -350,7 +350,7 @@ class SDTrainer(BaseSDTrainProcess):
if self.train_config.blank_prompt_preservation and self.cached_blank_embeds is None:
# make sure we have this if not unloading
self.cached_blank_embeds = self.sd.encode_prompt("", **encode_kwargs).to(
self.cached_blank_embeds = self.sd.encode_prompt("").to(
self.device_torch,
dtype=self.sd.torch_dtype
).detach()