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(ui): control adapter auto-process jank #6393

Merged
merged 2 commits into from
May 18, 2024

Conversation

psychedelicious
Copy link
Collaborator

Summary

  • Fixes an edge case where we'd do processing unnecessarily
  • Fixes a minor bug when clearing processor.

Related Issues / Discussions

n/a

QA Instructions

  • Try changing the control model from ControlNet Canny to T2I Canny (leave processor settings default). Should not re-process the image.
  • Open the JS console. Clear the processor. There should be no errors talking about config being null.

Merge Plan

n/a

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • Documentation added / updated (if applicable)

@github-actions github-actions bot added the frontend PRs that change frontend files label May 18, 2024
@psychedelicious psychedelicious enabled auto-merge (rebase) May 18, 2024 21:23
If you change the control model and the new model has the same default processor, we would still re-process the image, even if there was no need to do so.

With this change, if the image and processor config are unchanged, we bail out.
When clearing the processor config, we shouldn't re-process the image. This logic wasn't handled correctly, but coincidentally the bug didn't cause a user-facing issue.

Without a config, we had a runtime error when trying to build the node for the processor graph and the listener failed.

So while we didn't re-process the image, it was because there was an error, not because the logic was correct.

Fix this by bailing if there is no image or config.
@psychedelicious psychedelicious force-pushed the psyche/fix/ui/ca-preprocess-jank branch from ed989ba to bbd08da Compare May 18, 2024 21:23
@psychedelicious psychedelicious merged commit af3fd26 into main May 18, 2024
14 checks passed
@psychedelicious psychedelicious deleted the psyche/fix/ui/ca-preprocess-jank branch May 18, 2024 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend PRs that change frontend files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants