Fixe a variable that could nt be declared when doing blank prompt preservation
This commit is contained in:
@@ -350,7 +350,7 @@ class SDTrainer(BaseSDTrainProcess):
|
|||||||
|
|
||||||
if self.train_config.blank_prompt_preservation and self.cached_blank_embeds is None:
|
if self.train_config.blank_prompt_preservation and self.cached_blank_embeds is None:
|
||||||
# make sure we have this if not unloading
|
# 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,
|
self.device_torch,
|
||||||
dtype=self.sd.torch_dtype
|
dtype=self.sd.torch_dtype
|
||||||
).detach()
|
).detach()
|
||||||
|
|||||||
Reference in New Issue
Block a user