diff --git a/README.md b/README.md index c969ebfc41..1a2605d568 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,13 @@ You may also pass a -v option to generate count variants on the original passing the first generated image back into img2img the requested number of times. It generates interesting variants. +## Seamless Tiling + +The seamless tiling mode causes generated images to be seamlessly tile with itself. To use it, add the --seamless option when starting the script which will result in all generated images to tile, or for each dream> prompt as shown here: +``` +dream> "pond garden with lotus by claude monet" --seamless -s100 -n4 +``` + ## GFPGAN and Real-ESRGAN Support The script also provides the ability to do face restoration and diff --git a/scripts/dream.py b/scripts/dream.py index 16bc96946e..9b2975ab96 100755 --- a/scripts/dream.py +++ b/scripts/dream.py @@ -87,6 +87,9 @@ def main(): print(f'{e}. Aborting.') sys.exit(-1) + if opt.seamless: + print(">> changed to seamless tiling mode") + # preload the model tic = time.time() t2i.load_model() @@ -94,14 +97,6 @@ def main(): f'>> model loaded in', '%4.2fs' % (time.time() - tic) ) - for m in t2i.model.modules(): - if isinstance(m, (nn.Conv2d, nn.ConvTranspose2d)): - m._orig_padding_mode = m.padding_mode - if opt.seamless: - m.padding_mode = 'circular' - if opt.seamless: - print(">> changed to seamless tiling mode") - if not infile: print( "\n* Initialization done! Awaiting your command (-h for help, 'q' to quit)"