Skip to content

Commit

Permalink
* Removed unnecessary code
Browse files Browse the repository at this point in the history
* Added description about --seamless
  • Loading branch information
prixt committed Sep 3, 2022
1 parent 02bee4f commit a61e49b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
Expand Down
11 changes: 3 additions & 8 deletions scripts/dream.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,21 +87,16 @@ 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()
print(
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)"
Expand Down

0 comments on commit a61e49b

Please sign in to comment.