Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ldm/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,9 @@ def process_image(image,seed):
self.sampler_name = sampler_name
self._set_sampler()

# apply the concepts library to the prompt
prompt = self.concept_lib().replace_concepts_with_triggers(prompt, lambda concepts: self.load_concepts(concepts))

# bit of a hack to change the cached sampler's karras threshold to
# whatever the user asked for
if karras_max is not None and isinstance(self.sampler,KSampler):
Expand Down
2 changes: 0 additions & 2 deletions ldm/invoke/CLI.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,6 @@ def image_writer(image, seed, upscaled=False, first_seed=None, use_prefix=None):
last_results.append([path, seed])

if operation == 'generate':
# load any <embeddings> from the SD concepts library
opt.prompt = gen.concept_lib().replace_concepts_with_triggers(opt.prompt, lambda concepts: gen.load_concepts(concepts))
catch_ctrl_c = infile is None # if running interactively, we catch keyboard interrupts
opt.last_operation='generate'
try:
Expand Down