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

How to use classifier-free guidance when in-context learning ? #190

Open
lucky-liuzhihong opened this issue Jan 16, 2025 · 1 comment
Open

Comments

@lucky-liuzhihong
Copy link

Thank you for open-sourcing such meaningful work! I am trying to experiment with in-context learning but I am not sure how to use classifier-free guidance. For example, when the input is "According to the following examples: input |image_1|, output |image_2|. Generate an output for the input |image_3|", what should the corresponding image_cond and uncond be?

Also, could you clarify what typical values are for text_cfg_scale and image_cfg_scale in in-context learning?

@staoxiao
Copy link
Contributor

Hi, @lucky-liuzhihong , thanks for your attention to our work!
For prompt format and cases of in-context-learning, you can refer to https://github.com/VectorSpaceLab/OmniGen/blob/main/app.py#L242-L254.

image_cond is only image inputs: image_1 image_2 image_3 (https://github.com/VectorSpaceLab/OmniGen/blob/main/OmniGen/processor.py#L137-L138), while uncond means no any prompt or just negative prompt(https://github.com/VectorSpaceLab/OmniGen/blob/main/OmniGen/processor.py#L134)

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