Files
MaraScott 0a51efc56b Feature Add Dynamic Tiling (#68)
* update McBoaty to more OOP approach

* Apply a refiner after upscaling + start dynamicaly define the number of tiles to refine

* refactoring and upgrading the grid system to be dynamic

* update grid system to order properly tile

* add inpainting vae encode

* Upgrade McBoaty to work with Dynamic Tiling for 4 tiles

* Correct rebuild system for dynamic tiling

* Hotfix tile assignment

* apply dynamiztion if the grid cutting sequence to retrieve the entire image and not only part of it

* removed middle tiles to identify issues, the tiles seems a little bit bigger than expected

* pursuing hotfix

* improving reinsertion of tiles in the grid

* fix image distribution

* fix feather display

* create McBoatyV3

* create McBoatyV3

* hotfix McBoatyV2

* hotfix mono image tile

* add McBoaty v3 + refactorize MS_image code for Version compatibility and modifying import

* Update code to allow Version for inc file MS_Image and MS_Mask

* Improve tile upscaling adding an extra feather on the left side or top side

* Update grid slicing to allow all type of ratio

* revise get_grid_image in case tile do not match original image size

* update rebuild process to handle any ratio images

* update to handle any ratio in image rebuilding process

* update outpainting sigmas denoise value to get image from outpainting

* revert to previous version of get_grid_images + hotfix on coordinate
2024-06-13 09:31:40 +02:00

24 lines
478 B
Python

#!/usr/bin/env python3
# -*- coding:utf-8 -*-
#
###
class MS_Array:
@staticmethod
def reorder_edges_to_center(arr):
result = []
left = 0
right = len(arr) - 1
while left <= right:
if left == right:
result.append(arr[left])
else:
result.append(arr[left])
result.append(arr[right])
left += 1
right -= 1
return result