Detextr is a tool for repainting styled text from images using Stable Diffusion with canny edge Control-Net and font style transfer.
- for the first time, install the required packages by running the following command in the terminal:
pip install -r requirements.txt
-
(optional) we also provide a pre-trained Lora model for you to use. You can download it from here and place it in the
weights
directory. -
download pretrained models from TextEffects and the example image from exampe_image
-
unzip the downloaded FET-GAN pre-trained model and place it in the
weights
directory. -
unzip the downloaded FET-GAN pre-trained model and place it in the workspace as the
image_repos
directory. -
now you should have a directory structure like this:
.
├── configs
├── fft
├── image_repos
├── models
├── networks
├── process
├── utils
└── weights
- run the following command in the terminal( for the first time, pre-trained diffusion model would be downloaded, which may take tens of minutes):
python detextr.py 1 1 [text]
such as:
python detextr.py 1 1 A
- the result will be saved as
result.png
in the workspace.