text
GRID-6X : Layout for Seamless Image Assembly 🔥
GRID-6X : Layout for Seamless Image Assembly 🔥
new_line
new_line
text
🪨Demo:  
🪨Demo:  
resource
https://huggingface.co/spaces/prithivMLmods/GRID-6X
space
prithivMLmods/GRID-6X
https://huggingface.co/spaces/prithivMLmods/GRID-6X
new_line
text
🪨Doc / Blog: 
🪨Doc / Blog: 
link
https://huggingface.co/blog/prithivMLmods/grid-6x
https://huggingface.co/blog/prithivMLmods/grid-6x
new_line
new_line
text
In the 
In the 
inline_code
`infer`
infer
text
 function:
 function:
new_line
code_fence
```python
grid_img = Image.new('RGB', (width * grid_size_x, height * grid_size_y))
for i, img in enumerate(result.images[:num_images]):
    grid_img.paste(img, (i % grid_size_x * width, i // grid_size_x * height))
```
grid_img = Image.new('RGB', (width * grid_size_x, height * grid_size_y))
for i, img in enumerate(result.images[:num_images]):
    grid_img.paste(img, (i % grid_size_x * width, i // grid_size_x * height))
python
new_line
text
1. **Image Initialization**: 
1. **Image Initialization**: 
inline_code
`grid_img`
grid_img
text
 is a blank canvas that will hold the images in a grid format.
 is a blank canvas that will hold the images in a grid format.
new_line
text
2. **Image Placement**: Images are pasted onto the canvas using a loop:
2. **Image Placement**: Images are pasted onto the canvas using a loop:
new_line
text
   - **Horizontal Position**: 
   - **Horizontal Position**: 
inline_code
`(i % grid_size_x) * width`
(i % grid_size_x) * width
text
 calculates the x-coordinate.
 calculates the x-coordinate.
new_line
text
   - **Vertical Position**: 
   - **Vertical Position**: 
inline_code
`(i // grid_size_x) * height`
(i // grid_size_x) * height
text
 calculates the y-coordinate.
 calculates the y-coordinate.
new_line
new_line
text
1. **Grid Size Selection**: The user selects the grid size from options like "2x1", "1x2", "2x2", "2x3", "3x2", and "1x1". Each option corresponds to the arrangement of images:
1. **Grid Size Selection**: The user selects the grid size from options like "2x1", "1x2", "2x2", "2x3", "3x2", and "1x1". Each option corresponds to the arrangement of images:
new_line
text
   - **2x1**: 2 images in a single row
   - **2x1**: 2 images in a single row
new_line
text
   - **1x2**: 1 image in two rows (column layout)
   - **1x2**: 1 image in two rows (column layout)
new_line
text
   - **2x2**: 2 rows with 2 images each
   - **2x2**: 2 rows with 2 images each
new_line
text
   - **2x3**: 2 rows with 3 images each
   - **2x3**: 2 rows with 3 images each
new_line
text
   - **3x2**: 3 rows with 2 images each
   - **3x2**: 3 rows with 2 images each
new_line
text
   - **1x1**: A single image (default)
   - **1x1**: A single image (default)
new_line
new_line
text
2. **Image Generation**: Based on the grid size selection, the app calculates the number of images to generate. For example:
2. **Image Generation**: Based on the grid size selection, the app calculates the number of images to generate. For example:
new_line
text
   - If the grid size is "2x2", the app generates 4 images.
   - If the grid size is "2x2", the app generates 4 images.
new_line
text
   - For "3x2", it generates 6 images.
   - For "3x2", it generates 6 images.
new_line
new_line
text
-> Each option arranges images accordingly, providing flexibility in viewing multiple images in one output.
-> Each option arranges images accordingly, providing flexibility in viewing multiple images in one output.
new_line
new_line
text
-> Added both of these spaces that support the GRID functionality Layout for Seamless Image Assembly : 
-> Added both of these spaces that support the GRID functionality Layout for Seamless Image Assembly : 
new_line
new_line
text
----------
----------
new_line
text
🔥IMAGINEO-4K: 
🔥IMAGINEO-4K: 
resource
https://huggingface.co/spaces/prithivMLmods/IMAGINEO-4K
space
prithivMLmods/IMAGINEO-4K
https://huggingface.co/spaces/prithivMLmods/IMAGINEO-4K
new_line
new_line
text
🔥GRID-6X: 
🔥GRID-6X: 
resource
https://huggingface.co/spaces/prithivMLmods/GRID-6X
space
prithivMLmods/GRID-6X
https://huggingface.co/spaces/prithivMLmods/GRID-6X
new_line
text
----------
----------
new_line
text
.
.
new_line
text
.
.
new_line
text
.@prithivMLmods  🤗
.@prithivMLmods  🤗
GRID-6X : Layout for Seamless Image Assembly 🔥

🪨Demo:  https://huggingface.co/spaces/prithivMLmods/GRID-6X
🪨Doc / Blog: https://huggingface.co/blog/prithivMLmods/grid-6x

In the `infer` function:
```python
grid_img = Image.new('RGB', (width * grid_size_x, height * grid_size_y))
for i, img in enumerate(result.images[:num_images]):
    grid_img.paste(img, (i % grid_size_x * width, i // grid_size_x * height))
```
1. **Image Initialization**: `grid_img` is a blank canvas that will hold the images in a grid format.
2. **Image Placement**: Images are pasted onto the canvas using a loop:
   - **Horizontal Position**: `(i % grid_size_x) * width` calculates the x-coordinate.
   - **Vertical Position**: `(i // grid_size_x) * height` calculates the y-coordinate.

1. **Grid Size Selection**: The user selects the grid size from options like "2x1", "1x2", "2x2", "2x3", "3x2", and "1x1". Each option corresponds to the arrangement of images:
   - **2x1**: 2 images in a single row
   - **1x2**: 1 image in two rows (column layout)
   - **2x2**: 2 rows with 2 images each
   - **2x3**: 2 rows with 3 images each
   - **3x2**: 3 rows with 2 images each
   - **1x1**: A single image (default)

2. **Image Generation**: Based on the grid size selection, the app calculates the number of images to generate. For example:
   - If the grid size is "2x2", the app generates 4 images.
   - For "3x2", it generates 6 images.

-> Each option arranges images accordingly, providing flexibility in viewing multiple images in one output.

-> Added both of these spaces that support the GRID functionality Layout for Seamless Image Assembly : 

----------
🔥IMAGINEO-4K: https://huggingface.co/spaces/prithivMLmods/IMAGINEO-4K

🔥GRID-6X: https://huggingface.co/spaces/prithivMLmods/GRID-6X
----------
.
.
.@prithivMLmods  🤗
🔥
rdrede darksfx hypergod civet789 prithivMLmods Ngrthm RenderIo
❤️
rdrede ai4life44 civet789 Ngrthm
👀
John6666 rdrede Danis146
😎
Vexia RenderIo
👍
Kasnol