-
Notifications
You must be signed in to change notification settings - Fork 910
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate samples together with the dataset. #1383
base: main
Are you sure you want to change the base?
Conversation
Thank you for this! This is very interesting. I will review this sooner. I am just concerned about how it works with non-Windows systems. It might be better to use default font instead of |
This sounds good. I had to write a python script that repeatedly overwrites sample.txt with random captions to achieve this, but it would be nicer if it was integrated into sd-scripts itself. |
idx = (idx + 1) % len(example_tuple[1]) | ||
if idx == 0: | ||
break | ||
prompt_dict["prompt"] = prompt_dict.get("prompt").replace('__caption__', 'example_tuple[1][idx]') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be:
prompt_dict["prompt"] = prompt_dict.get("prompt").replace('__caption__', example_tuple[1][idx])
?
Current behavior replacing with the string 'example_tuple[1][idx]' instead of the value of the tuple
If your sample's prompt includes __caption__, it will select an example from the batch (preferring those without caption dropout).
It then combines the latent and caption from batch to produce a sample, caption is displayed at the top.
Each occurrence of __caption__ generates once, and can be combined with the original sample args.