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

Improve model implementation + weight loading from inswapper_128.onnx + inference code #10

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

blend-er
Copy link

@blend-er blend-er commented Dec 27, 2024

StyleTransferModel_128.py Changes

  • Rewrote AdaIN using InstanceNorm2d
  • Simplified decoder path

weight_transfer.ipynb

  • Maps weights directly from inswapper_128.onnx to StyleTransferModel
    todo: figure out why swap.py produces samples that slightly differ from inswapper.

StyleTransferModel:
StyleTransferModel

Inswapper:
inswapperOutput

@blend-er blend-er changed the title Improved AdaIN Implementation with Dedicated Style Blocks Improve model implementation + weight loading from inswapper_128.onnx + inference code Dec 28, 2024
@mikecokina
Copy link

@blend-er , have you tried your version of the architecture with the checkpoints provided in this project? For example, using the reswapper-1019500.pth checkpoint? I converted the weights of INSwapper using the code you shared in the Jupyter notebook and successfully executed it for INSwapper. Unfortunately, all results with the RESwapper checkpoints turn out as completely gray images.

@blend-er
Copy link
Author

blend-er commented Jan 1, 2025

Hi @mikecokina, I have added conversion from old reswapper checkpoints in the notebook.

@mikecokina
Copy link

@blend-er , can confirm it works perfectly now. Thank you for your quick response!

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

Successfully merging this pull request may close these issues.

3 participants