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

multi prompting #102

Open
kasparovabi opened this issue Oct 25, 2023 · 4 comments
Open

multi prompting #102

kasparovabi opened this issue Oct 25, 2023 · 4 comments

Comments

@kasparovabi
Copy link

is multi prompting possible?

@williamyang1991
Copy link
Owner

Do you mean different frames in a video use different prompts?

Or multiple prompts in a single prompt, with different weights?

@kasparovabi
Copy link
Author

i have a video with different scenes, so i need to prompt every scene with different styles, is it maybe possible like this
"{'0': ['prompt1'], '18': ['prompt2'], '54': ['prompt3']}"

@FurkanGozukara
Copy link

i have a video with different scenes, so i need to prompt every scene with different styles, is it maybe possible like this "{'0': ['prompt1'], '18': ['prompt2'], '54': ['prompt3']}"

this would be nice

@williamyang1991
Copy link
Owner

@kasparovabi Our code does not support this function.
But it is not hard to implement this function yourself.

Instead of using a global prompt cfg.prompt,

Rerender_A_Video/webUI.py

Lines 435 to 441 in a348e0a

cond = {
'c_concat': [control],
'c_crossattn': [
model.get_learned_conditioning(
[cfg.prompt + ', ' + cfg.a_prompt] * num_samples)
]
}

you can maintain a list prompt_list to fetch the prompt of the i-th frame, something like prompt_list[i] to replace cfg.prompt.

However, since our method renders the current frame based on its previous and the first frame, to get the best results, the input video should be better in only a single scene.
For multiple scenes, you'd better clip the video into subvideo and rerender each scene seperately.

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

3 participants