* Removed unnecessary code

* Added description about --seamless
This commit is contained in:
prixt 2022-09-03 22:39:35 +09:00
parent 02bee4fdb1
commit a61e49bc97
2 changed files with 10 additions and 8 deletions

View File

@ -131,6 +131,13 @@ You may also pass a -v<count> option to generate count variants on the original
passing the first generated image back into img2img the requested number of times. It generates interesting passing the first generated image back into img2img the requested number of times. It generates interesting
variants. 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 ## GFPGAN and Real-ESRGAN Support
The script also provides the ability to do face restoration and The script also provides the ability to do face restoration and

View File

@ -87,6 +87,9 @@ def main():
print(f'{e}. Aborting.') print(f'{e}. Aborting.')
sys.exit(-1) sys.exit(-1)
if opt.seamless:
print(">> changed to seamless tiling mode")
# preload the model # preload the model
tic = time.time() tic = time.time()
t2i.load_model() t2i.load_model()
@ -94,14 +97,6 @@ def main():
f'>> model loaded in', '%4.2fs' % (time.time() - tic) 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: if not infile:
print( print(
"\n* Initialization done! Awaiting your command (-h for help, 'q' to quit)" "\n* Initialization done! Awaiting your command (-h for help, 'q' to quit)"