mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
[Fooocus 2.0.60] Fooocus Inpaint or Outpaint (Midjourney Left/Right/Top/Bottom) (#402)
[Fooocus 2.0.60] Fooocus Inpaint or Outpaint (Midjourney Left/Right/Top/Bottom) (#402)
This commit is contained in:
@@ -28,6 +28,12 @@ def image_is_generated_in_current_ui(image, ui_width, ui_height):
|
||||
LANCZOS = (Image.Resampling.LANCZOS if hasattr(Image, 'Resampling') else Image.LANCZOS)
|
||||
|
||||
|
||||
def resample_image(im, width, height):
|
||||
im = Image.fromarray(im)
|
||||
im = im.resize((width, height), resample=LANCZOS)
|
||||
return np.array(im)
|
||||
|
||||
|
||||
def resize_image(im, width, height, resize_mode=1):
|
||||
"""
|
||||
Resizes an image with the specified resize_mode, width, and height.
|
||||
|
||||
Reference in New Issue
Block a user