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

Fix regional prompt mask padding #6187

Merged
merged 3 commits into from
Apr 9, 2024

Conversation

RyanJDick
Copy link
Collaborator

Summary

This PR fixes a bug with regional prompting and regional IP-Adapter. Prior to this change, using regional prompts with input latent dimensions that aren't evenly divisible by 8 would raise an exception.

This issue was reported here: https://discord.com/channels/1020123559063990373/1049495067846524939/1227274512685338714

The root cause was that region mask downscaling did not mirror the downscaling padding behvaior of the SD/SDXL UNets.

QA Instructions

I tested the following:

  • Regional prompts, image resolution of 368x696, SD1.5
  • Regional prompts, image resolution of 368x696, SDXL
  • Regional IP-Adapter, image resolution of 368x696, SD1.5
  • Regional IP-Adapter, image resolution of 368x696, SDXL

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable) Test coverage is low - hence how this bug made it in.
  • Documentation added / updated (if applicable) N/A

…rror the downscaling behavior of SD and SDXL. Prior to this change, denoising with input latent dimensions that were not evenly divisible by 8 would raise an exception.
…o mirror the downscaling behavior of SD and SDXL. Prior to this change, denoising with input latent dimensions that were not evenly divisible by 8 would raise an exception.
@github-actions github-actions bot added python PRs that change python files backend PRs that change backend files labels Apr 9, 2024
@hipsterusername hipsterusername merged commit f9af32a into main Apr 9, 2024
14 checks passed
@hipsterusername hipsterusername deleted the ryan/fix-regional-prompt-mask-padding branch April 9, 2024 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend PRs that change backend files python PRs that change python files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants