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

[Enhancement] Adding the X-adapter #2652

Closed
George0726 opened this issue Feb 20, 2024 · 2 comments
Closed

[Enhancement] Adding the X-adapter #2652

George0726 opened this issue Feb 20, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@George0726
Copy link
Contributor

Currently, X-adapter has released its codes and model. X-adapter makes the Controlnet for SD1.5 compatible with SDXL. It will be a great improvement on the current Diffusion community!
https://github.com/showlab/X-Adapter

@huchenlei huchenlei self-assigned this Feb 21, 2024
@huchenlei huchenlei added the enhancement New feature or request label Feb 21, 2024
@huchenlei
Copy link
Collaborator

I was looking into this a while ago. I did not find good approach to run 2 unets side by side in A1111 as the original diffusers impl provided by the paper author.

However, if we do not demand generation speed, X-adapter can be implemented using A1111's refiner mechanism. The first pass we do a SD1.5 generation and store the hidden states. The second pass when we generate with SDXL, we convert these hidden states to SDXL format with X-adapter and inject them.

However, X-adapter should probably be made into its own extension.

What need to change in this repo is probably the mechanism we use to filter ControlNet models. Currently ControlNet models are filtered based on active SD model's version.

@huchenlei
Copy link
Collaborator

According to my testing in showlab/X-Adapter#25, X-Adapter can be think as improved hiresfix, with lowres pass using SD15 checkpoint and highres pass using SDXL model. The adapter_guidance_start decides how much noise we are adding to the first pass result and how many steps to run in second pass.

Using second pass alone (Starting from pure random noise) won't give satisfying result. And this approach is highly dependent on SD15 model used. If a feature cannot be correctly interpreted by SD15 model, the SDXL model likely won't do a large modification on it.

Overall, I do not think it will worth the effort to implement X-Adapter.

@huchenlei huchenlei closed this as not planned Won't fix, can't repro, duplicate, stale Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants