lucidrains / deep-daze

Simple command line tool for text to image generation using OpenAI's CLIP and Siren (Implicit neural representation network). Technique was originally created by https://twitter.com/advadnoun
MIT License
4.37k stars 327 forks source link

Added story_separator #125

Closed Fliens closed 3 years ago

Fliens commented 3 years ago

Added story_separator By defining the separator the text will be split by the separator rather than using the story_start_words or story_words_per_epoch Any str can be used as a separator! If the separator is not in the text, the separator will be ignored and create_story will work as usual Also updated the README.md to include the change

NotNANtoN commented 3 years ago

This looks good implementation-wise. I'm just wondering whether it would be possible better to exclude the separator from the generation. Your example works well for normal punctuation, but if someone would want some weird splitting, then a special character such as | should probably be used - which you do not want deepdaze to interpret, therefore the separator would need to be removed from self.words.

Of course, this makes things more complicated. Maybe it would not be a problem to pass sentences into deepdaze as e.g. I am a chicken man. I have wings. |. But I have not tried it and would be careful.

Fliens commented 3 years ago

This looks good implementation-wise. I'm just wondering whether it would be possible better to exclude the separator from the generation. Your example works well for normal punctuation, but if someone would want some weird splitting, then a special character such as | should probably be used - which you do not want deepdaze to interpret, therefore the separator would need to be removed from self.words.

Of course, this makes things more complicated. Maybe it would not be a problem to pass sentences into deepdaze as e.g. I am a chicken man. I have wings. |. But I have not tried it and would be careful.

@NotNANtoN The separator will now be removed in each epoch and in the filename

Fliens commented 3 years ago

My question is if there should be some kind of testing if the user gives an empty string or one with the separator only I didn't implement that since it's not in the normal mode (without --create_story)

NotNANtoN commented 3 years ago

I assume some testing does not hurt and makes for a better user experience

Fliens commented 3 years ago

@StevenUS Could you please look over the sentences that I've now added since I'm not 100% sure if they're completely right :)

StevenUS commented 3 years ago

@Fliens looks good. One suggestion would be to move the trailing comments to the line above, to match the rest of the file/project.

lucidrains commented 3 years ago

lgtm 🙏