Reworked bucket loader to scale buckets to pixels amounts not just minimum size. Makes the network more consistant

This commit is contained in:
Jaret Burkett committed 2023-08-30 14:52:12 -06:00
1 parent d401348c2e
commit 33267e117c
6 files changed
+137 -69

No files matched your search

+1 -6
View File
@@ -60,12 +60,7 @@ class SDTrainer(BaseSDTrainProcess):
# activate network if it exits
with network:
with torch.set_grad_enabled(grad_on_text_encoder):
embedding_list = []
# embed the prompts
for prompt in conditioned_prompts:
embedding = self.sd.encode_prompt(prompt).to(self.device_torch, dtype=dtype)
embedding_list.append(embedding)
conditional_embeds = concat_prompt_embeds(embedding_list)
conditional_embeds = self.sd.encode_prompt(conditioned_prompts).to(self.device_torch, dtype=dtype)
if not grad_on_text_encoder:
# detach the embeddings
conditional_embeds = conditional_embeds.detach()