mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-16 00:49:40 +00:00
Update train_util.py
This commit is contained in:
@@ -5574,8 +5574,8 @@ def sample_images_common(
|
||||
with distributed_state.split_between_processes(prompts) as prompt_dict_lists:
|
||||
for prompt_dict in prompt_dict_lists:
|
||||
if '__caption__' in prompt_dict.get("prompt"):
|
||||
logger.info("No training prompts loaded, skipping '__caption__' prompt.")
|
||||
continue
|
||||
prompt_dict["prompt"] = prompt_dict.get("prompt").replace('__caption__', f'Astronaut riding a horse on the moon')
|
||||
logger.info("No training prompts loaded, replacing with placeholder 'Astronaut riding a horse on the moon' prompt.")
|
||||
sample_image_inference(
|
||||
accelerator, args, pipeline, save_dir, prompt_dict, epoch, steps, prompt_replacement, controlnet=controlnet
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user