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

About style transferring #27

Open
nldhuyen0047 opened this issue Sep 5, 2024 · 8 comments
Open

About style transferring #27

nldhuyen0047 opened this issue Sep 5, 2024 · 8 comments

Comments

@nldhuyen0047
Copy link

Hi, thanks for your excellent work.

I have a question about style transferring. I would like to transfer style of the target image into the content image, when inference, I test on both Contour and LineArt, but the result is not good.

With my datasets use for the inference, I use a cube with no details on it (I would like to add details for this) for the content image, and a house with details and colors for the target image. With the LineArt, the colors and some details needing to add in the content image is not filled, and with the Contour, the image changed so much and be quite messy.

Could you please give me some solutions for improving the result?

Thank you so much.

@Jeoyal
Copy link
Contributor

Jeoyal commented Sep 5, 2024

Hi @nldhuyen0047, thank you for your interest in our work. I noticed that you previously mentioned an issue related to model training. Are the inference results based your own training model?
Also, could you post the content image, style image, and the generated results?

@zhihongz
Copy link

zhihongz commented Sep 6, 2024

I met the same problem. For example, when the content image and the style image are the same, the output is supposed to be the same image as well (some works introduces identity loss to guarantee this). But with StyleShot, the output differs greatly with the input image.

@Jeoyal
Copy link
Contributor

Jeoyal commented Sep 6, 2024

Hi @zhihongz , thank you for your interest in our work. I randomly test some cases that have same content and style images, the outputs are the same image as well, here are the samples:
img_v3_02ef_7ab89337-7913-42ae-9b8f-ce7ae078a5cg
img_v3_02ef_ed7bb4c0-ecf2-4f9b-bffc-52662d5a262g
img_v3_02ef_2ee11bb8-e1aa-40f4-b6c3-00273aed698g

I think your difference comes from the resolution of inputs. Style image will be center crop in 512*512, while content image will not be processed, which might lead to difference.

@zhihongz
Copy link

zhihongz commented Sep 6, 2024

Emm, the output looks similiar to the input, but there are obvious differences. For example, the color of the cat in your last screen shot changes to blue.

@zhihongz
Copy link

zhihongz commented Sep 6, 2024

When you test with some natural images, the differences become even larger. You can exam this pic:

1725623619071_d

@Jeoyal
Copy link
Contributor

Jeoyal commented Sep 6, 2024

In StyleShot, styles are integrated into style embeddings by a specially designed style-aware encoder and then incorporated into the diffusion model through a cross-attention module. This highly aggregative style information is not suitable for pixel-level reconstruction.

@zhihongz
Copy link

zhihongz commented Sep 6, 2024

Got it, thanks for your patient and quick reply.

@nldhuyen0047
Copy link
Author

In StyleShot, styles are integrated into style embeddings by a specially designed style-aware encoder and then incorporated into the diffusion model through a cross-attention module. This highly aggregative style information is not suitable for pixel-level reconstruction.

Sorry for my late reply.

I have encountered some problems with the training model.

I got it. Thank you very much.

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

3 participants