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

[SDXL] Hardcoded input_block indices in hook.py #1937

Closed
huchenlei opened this issue Aug 21, 2023 · 2 comments
Closed

[SDXL] Hardcoded input_block indices in hook.py #1937

huchenlei opened this issue Aug 21, 2023 · 2 comments

Comments

@huchenlei
Copy link
Collaborator

Following code seems to fail when running SDXL model, as SDXL only has 9 input blocks

input_block_indices = [4, 5, 7, 8, 10, 11]
for w, i in enumerate(input_block_indices):
module = model.input_blocks[i]
module.gn_weight = 1.0 - float(w) / float(len(input_block_indices))
gn_modules.append(module)
output_block_indices = [0, 1, 2, 3, 4, 5, 6, 7]
for w, i in enumerate(output_block_indices):
module = model.output_blocks[i]
module.gn_weight = float(w) / float(len(output_block_indices))
gn_modules.append(module)

The code was added in #1278. I don't understand why reference adain need that code running even when reference control type is not selected. @lllyasviel

@huchenlei
Copy link
Collaborator Author

Blocking #1936

@huchenlei
Copy link
Collaborator Author

Worked around in #1936.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant