Add replacing triggers on prompts when caching text encoder
This commit is contained in:
1 parent
7ba7e35e19
commit
479c72ada2
1 file changed
+5
@@ -125,6 +125,11 @@ class SDTrainer(BaseSDTrainProcess):
|
|||||||
sample_item = self.sample_config.samples[i]
|
sample_item = self.sample_config.samples[i]
|
||||||
prompt = self.sample_config.prompts[i]
|
prompt = self.sample_config.prompts[i]
|
||||||
|
|
||||||
|
if self.trigger_word is not None:
|
||||||
|
prompt = self.sd.inject_trigger_into_prompt(
|
||||||
|
prompt, self.trigger_word, add_if_not_present=False
|
||||||
|
)
|
||||||
|
|
||||||
# needed so we can autoparse the prompt to handle flags
|
# needed so we can autoparse the prompt to handle flags
|
||||||
gen_img_config = GenerateImageConfig(
|
gen_img_config = GenerateImageConfig(
|
||||||
prompt=prompt, # it will autoparse the prompt
|
prompt=prompt, # it will autoparse the prompt
|
||||||
|
|||||||
Reference in new issue
Block a user