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

feat(ui): refactor Control Adapters in Control Layers #6298

Merged
merged 23 commits into from
May 2, 2024

Conversation

psychedelicious
Copy link
Collaborator

@psychedelicious psychedelicious commented May 1, 2024

Summary

This PR resolves a number of issues caused by the control adapters implementation being shared between Control Layers and the other tabs. The needs of CL vs the rest of the app are different enough that a lot of brittle special handling was needed. Also, there were sync issues between control adapter state and layer state, causing errors when a control adapter was deleted.

The solution is to split the control adapters handling. Control Layers now have a wholly separate CA implementation. I refined a lot of the handling of CA while working on this new implementation. The other tabs' functionality is unchanged. This does mean the UX for control adapters in CL is different from the rest of the app, but that's just how it's will be until those tabs are migrated over.

User-facing changes:

  • T2I adapter support
  • T2I adapter is merged w/ cnet
  • Full undo history in Control Layers (including the control adapters) - this fixes all the errors about missing layers/CAs
  • Many small bugs - in addition to the linked issues below:
    • Fixed infinite loop while setting bbox in canvas @JPPhoto
    • Fixed excessive auto-process calls and failed auto-process calls when rapidly changing processor settings (control layers only)
    • Fixed rendering of control images on CL sometimes not updating

Related Issues / Discussions

Closes #6297
Closes #6293

QA Instructions

  • Play with control adapters in control layers
  • Play with control adapters in img2img/UC

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)

…ion (wip)

- Revise control adapter config types
- Recreate all control adapter mutations in control layers slice
- Bit of renaming along the way - typing 'RegionalGuidanceLayer' over and over again was getting tedious
When typing in a number into the w/h number inputs, if the number is less than the step, it appears the value of 0 is used. This is unexpected; it means Chakra isn't clamping the value correctly (or maybe our wrapper isn't clamping it).

Add checks to never bail if the width or height value from the number input component is 0.
@github-actions github-actions bot added the frontend PRs that change frontend files label May 1, 2024
@github-actions github-actions bot added the frontend-deps PRs that change frontend dependencies label May 1, 2024
@psychedelicious psychedelicious marked this pull request as ready for review May 2, 2024 00:12
@hipsterusername hipsterusername merged commit c35625e into main May 2, 2024
14 checks passed
@hipsterusername hipsterusername deleted the psyche/feat/ui/split-control-adapters branch May 2, 2024 01:48
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 frontend-deps PRs that change frontend dependencies
Projects
None yet
2 participants