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

Migration with a specific content image #70

Open
mingheyuemankong opened this issue Nov 1, 2023 · 5 comments
Open

Migration with a specific content image #70

mingheyuemankong opened this issue Nov 1, 2023 · 5 comments

Comments

@mingheyuemankong
Copy link

If I want to specify a specific content image for style migration, which parameter should I set? You don't seem to have provided a parameter for changing the content image.

@mingheyuemankong
Copy link
Author

11

@mingheyuemankong
Copy link
Author

I have tried a number of operations that only allow me to make style changes to these four images.
In addition, I did not find a path to these four images, nor was I able to specify an image local to my device for the transformation

@rinongal
Copy link
Owner

rinongal commented Nov 1, 2023

These 4 images are GAN generated. This isn't really a style-transfer method, so there's no real notion of content and style images. It's a zero-shot finetuning method for GANs. If you want to use it for Style Transfer, what you can do is use an inversion encoder to map your image into the GAN's latent space, then re-generate it using the fine-tuned GAN. One of our Colab notebooks should have example code for doing this, and we had a HuggingFace space that lets you do the same operation.

@mingheyuemankong
Copy link
Author

mingheyuemankong commented Nov 2, 2023

Sorry, I tried to run the colab you provided, but I found the following error when executing "Step 3: Train the model".
image

In addition, when I executed "step 4: convert the image to the new domain" in "step 4: generate samples with the new model", the following error occurred.
image

@rinongal
Copy link
Owner

rinongal commented Nov 3, 2023

On the first error:
I see that torchvision was updated to use "value_range" instead of "range", you'll have to either downgrade to an older version of torchvision from before this change, or update the save_images function (

) to use the new API.

On the second error:
You need to run the 3rd cell before you can run the 4th. The net object is created in the 3rd cell.

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

2 participants