Skip to content

official-elinas/squarize-images-update

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

squarize-images-updated

  1. Place the inside of the src folder in stable-diffusion folder in the webui-fork or whatever else you're using.

  2. Create a new conda environment using the following command conda env create --file=environment.yaml

  3. Run pip install foliantcontrib.imagemagick natsort==8.2.0 on top of your activated conda environment named ldzzz, make sure your terminal says (ldzzz)

  4. Download the pre-trained weights (curl works on Windows Git Bash, or just download it manually)

wget -O src/latent-diffusion/models/ldm/inpainting_big/last.ckpt https://heibox.uni-heidelberg.de/f/4d9ac7ea40c64582b7c9/?dl=1
  1. Running the script - my config, replace as needed
"C:\Users\<user>\miniconda3\envs\ldzzz\python.exe" \
"<location_to_squarizeimages>\repositories\stable-diffusion\latent-diffusion\squarizeimages.py" \
--input "<input_location>" \
--steps 50 --projectname my_project \
--outdir "<output_location>" \
--latent_diffusion "<latent_diffusion_directory>"

Note: Use fully qualified paths.

--input "path/to/input/images/folder/" the input folder

--steps "50" the amount of steps the inpainting does

--edgeremoval "1" activates --edgedetection

--edgedetection "40%" the percentage of how much borderdetection is going on

--extra_crop "1" adds an extra 10px crop on each side

--outdir "path/to/output/images/folder" the output folder

Not using VOC at the time --voc "1" if you have voc installed it will use the folders in voc automatically and you won't need to pass the latent diffusion location

--latent_diffusion_path "path/to/Stable Diffusion/src/latent-diffusion" only pass this if you're not using the voc version

this is an example of a combination of --edgeremoval "1" --edgedetection "40%" --extra_crop "1" to remove borders

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Jupyter Notebook 85.5%
  • Python 14.4%
  • Other 0.1%