-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Guiders support for Wan #11211
base: feature/guiders
Are you sure you want to change the base?
Guiders support for Wan #11211
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
attention_kwargs=attention_kwargs, | ||
return_dict=False, | ||
)[0] | ||
noise_pred = noise_uncond + guidance_scale * (noise_pred - noise_uncond) | ||
guidance.prepare_outputs(noise_pred) |
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.
so first, let's test very very thorougly on the potentially performance difference on this change (only need to SDXL for now, different num_images_per_prompt, machine type, etc)
second, code-wise I think it's less confusing with something like this, i.e. explicitly pass the model as input (otherwise it's unclear there is a model call there), and a function should always return an output if it modify input
noise_pred = guider.prepare_cond( self.transformer, ...)
outputs = guider.prepare_guider_output( self.transformer, ....)
This PR shows the changes required to make existing pipelines compatible with guiders.
Example results with Wan 1.3B:
AdaptiveProjectedGuidance.mp4
ClassifierFreeGuidance.mp4
ClassifierFreeZeroStarGuidance.mp4
PerturbedAttentionGuidance.mp4
SkipLayerGuidance.mp4
code