Skip to content
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

story to images #33

Open
zulihit opened this issue Jul 24, 2024 · 4 comments
Open

story to images #33

zulihit opened this issue Jul 24, 2024 · 4 comments

Comments

@zulihit
Copy link

zulihit commented Jul 24, 2024

Thank you for your wonderful work. May I ask if it is possible for me to input a story and output a series of images. How can I implement this function

@haoningwu3639
Copy link
Owner

Well, since different people input stories in various ways (direct input or calling GPT to generate), we did not implement a function/interface for non-researchers.
But you can divide the story into prompts one by one, and generate the story frames step by step in an auto-regressive way by using the functions in 'inference.py'.
You can also further encapsulate a loop based on it to auto-regressively generate the image sequence corresponding to the entire story at once.

@zulihit
Copy link
Author

zulihit commented Jul 28, 2024

Well, since different people input stories in various ways (direct input or calling GPT to generate), we did not implement a function/interface for non-researchers. But you can divide the story into prompts one by one, and generate the story frames step by step in an auto-regressive way by using the functions in 'inference.py'. You can also further encapsulate a loop based on it to auto-regressively generate the image sequence corresponding to the entire story at once.

Thank you for your reply. I noticed in inference.py that there is the following code:

prompt = "The white cat is running after the black-haired man."
prev_p = ["The black-haired man", "The white cat."]
ref_image = ["./data/boy.jpg", "./data/whitecat1.jpg"]
I couldn't find the files boy.jpg and whitecat1.jpg in the data folder. Could you please provide a prompt list and ref_images related to Figure 1 in the paper or another simple story, as well as instructions on how to run it and show the results? I would be very grateful.

@zulihit
Copy link
Author

zulihit commented Jul 29, 2024 via email

@haoningwu3639
Copy link
Owner

Sorry for the late reply, I was on vacation last week.
You can consider using the simple mode first, that is, taking one frame as the context condition.
First, use the single-frame version of our model, that is, single-frame inference without context conditions to generate a story protagonist, such as "The black-haired man"; Then use our auto-regressive mode to use prev_p and ref_image as conditions to continue generating the next frame.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants