#๐Ÿ”’ Outpainting in stable dyffusion

9 messages ยท Page 1 of 1 (latest)

sharp pewter
#

I am trying to find a way to create outpating using python. I already download model and created code for sending prompt and reciving photo, but I want to do the same in order to get outpainted photos, how to do that? I want to expand that bacground

dapper drumBOT
#

@sharp pewter

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

wicked bear
#

you can extend the borders of the image using numpy

#

how are you receiving the photo?

#
import Image

old_im = Image.open('someimage.jpg')
old_size = old_im.size

new_size = (800, 800)
new_im = Image.new("RGB", new_size)   ## luckily, this is already black!
box = tuple((n - o) // 2 for n, o in zip(new_size, old_size))
new_im.paste(old_im, box)
grave juniper
#

that looks like Pillow rather than numpy, or am I confused?

wicked bear
dapper drumBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.