Skip to content

Use Stable Diffusion to generate a style image from a user-specified prompt, then apply the style to a content image.

License

Notifications You must be signed in to change notification settings

LinaAliceAnderson/style-transfer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Style-Transfer

Step 1: Generating Style Image

Initially, the code utilises Stable Diffusion to create a style image based on a user-provided prompt. This step is optional if a pre-generated style image named 'generated_image.png' exists in the same folder.

Step 2: Applying Style

Next, the generated or provided style is applied to the content image, which should also be placed in the same folder. The code visualises the style transfer progress, allowing users to observe changes in real-time.

Optional: Saving Progress

Optionally, users can choose to save intermediate images depicting the gradual style transfer process. These images can later be converted into a GIF using the provided script.

30 iterations output

Requirements

To execute this code, you will need:

  • python 3
  • torch
  • torchvision
  • diffusers
  • transformers
  • matplotlib
  • pillow

Disclaimer

The author bears no responsibility if this code or any part thereof breaks your computer or your dreams.

About

Use Stable Diffusion to generate a style image from a user-specified prompt, then apply the style to a content image.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages