Samples view become from full width view, how to fix to grid view
This is for bugs only
Did you already ask in the discord?
Yes
You verified that this is a bug and not a feature request or question by asking in the discord?
Yes
I have the issue while viewing the sample, it doesnt show as grid view, instead is showing full width image, it is very hard for me to view
same here when training z image model - qwen image works fine
same here when training z image model - qwen image works fine
Ya.. i facing this issue while training lora for Z-Image
Temporary workaround. Inspect element. Find the grid div for the samples inside the "<div class="pb-4">" div
Apply: grid-template-columns: repeat(15, minmax(0, 1fr));
Change 15 to however many prompts you set for the training.
Will only work until you refresh but is easy enough to set for a training.
Or if you are willing to use a css injector/extension like: https://github.com/swcolegrove/css-override-web-extension
You can set these in it for the site and it should auto handle between 1 and 20 sample prompts:
.pb-4 > .grid.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
.pb-4 > .grid.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.pb-4 > .grid.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.pb-4 > .grid.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.pb-4 > .grid.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
.pb-4 > .grid.grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
.pb-4 > .grid.grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)) !important; }
.pb-4 > .grid.grid-cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)) !important; }
.pb-4 > .grid.grid-cols-9 { grid-template-columns: repeat(9, minmax(0, 1fr)) !important; }
.pb-4 > .grid.grid-cols-10 { grid-template-columns: repeat(10, minmax(0, 1fr)) !important; }
.pb-4 > .grid.grid-cols-11 { grid-template-columns: repeat(11, minmax(0, 1fr)) !important; }
.pb-4 > .grid.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)) !important; }
.pb-4 > .grid.grid-cols-13 { grid-template-columns: repeat(13, minmax(0, 1fr)) !important; }
.pb-4 > .grid.grid-cols-14 { grid-template-columns: repeat(14, minmax(0, 1fr)) !important; }
.pb-4 > .grid.grid-cols-15 { grid-template-columns: repeat(15, minmax(0, 1fr)) !important; }
.pb-4 > .grid.grid-cols-16 { grid-template-columns: repeat(16, minmax(0, 1fr)) !important; }
.pb-4 > .grid.grid-cols-17 { grid-template-columns: repeat(17, minmax(0, 1fr)) !important; }
.pb-4 > .grid.grid-cols-18 { grid-template-columns: repeat(18, minmax(0, 1fr)) !important; }
.pb-4 > .grid.grid-cols-19 { grid-template-columns: repeat(19, minmax(0, 1fr)) !important; }
.pb-4 > .grid.grid-cols-20 { grid-template-columns: repeat(20, minmax(0, 1fr)) !important; }
Here's a greasemonkey/violentmonkey/tampermonkey script that will fix the grid to work with up to 50 samples per batch:
// ==UserScript==
// @name AI-Toolkit Grid Auto-Fixer
// @include http://*:8675/*
// @include http://*:7860/*
// @include http://*:7861/*
// @description Forces AI-Toolkit samples into a grid. Should be compatible with Greasemonkey, Violentmonkey, Tampermonkey, etc.
// @grant none
// ==/UserScript==
(function() {
'use strict'; const uuidPattern = /\/jobs\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i; if (!uuidPattern.test(window.location.href)) {return;}
let cssRules = `.pb-4 .grid {gap: 2px !important;}`;
for (let i = 1; i <= 50; i++) {cssRules += `.pb-4 > .grid.grid-cols-${i} {grid-template-columns: repeat(${i}, minmax(0, 1fr)) !important;}`;}
// Uncomment the following line and each sample batch will be split across 2 rows instead of all on 1 row. You can change the Math.ceil(i/X) value to change the number of rows per sample batch.
// for (let i = 1; i <= 50; i++) {cssRules += `.pb-4 > .grid.grid-cols-${i} {grid-template-columns: repeat(${Math.ceil(i/2)}, minmax(0, 1fr)) !important;}`;}
const style = document.createElement('style'); style.textContent = cssRules; document.head.appendChild(style);
})();
Works on my machine, anyway.
It only activates after the second batch of samples starts to be generated.
Here's a greasemonkey/violentmonkey/tampermonkey script that will fix the grid to work with up to 50 samples per batch:
// ==UserScript== // @name AI-Toolkit Grid Auto-Fixer // @include http://:8675/ // @include http://:7860/ // @include http://:7861/ // @description Forces AI-Toolkit samples into a grid. Should be compatible with Greasemonkey, Violentmonkey, Tampermonkey, etc. // @grant none // ==/UserScript== (function() { 'use strict'; const uuidPattern = //jobs/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i; if (!uuidPattern.test(window.location.href)) {return;} let cssRules =
.pb-4 .grid {gap: 2px !important;}; for (let i = 1; i <= 50; i++) {cssRules +=.pb-4 > .grid.grid-cols-${i} {grid-template-columns: repeat(${i}, minmax(0, 1fr)) !important;};} // Uncomment the following line and each sample batch will be split across 2 rows instead of all on 1 row. You can change the Math.ceil(i/X) value to change the number of rows per sample batch. // for (let i = 1; i <= 50; i++) {cssRules +=.pb-4 > .grid.grid-cols-${i} {grid-template-columns: repeat(${Math.ceil(i/2)}, minmax(0, 1fr)) !important;};} const style = document.createElement('style'); style.textContent = cssRules; document.head.appendChild(style); })();Works on my machine, anyway.
It only activates after the second batch of samples starts to be generated.
This doesn't really work work me tbh
This doesn't really work work me tbh
Hit refresh on the samples page
This issue has been automatically closed due to inactivity. It has had no activity for 3 months.
If this issue is still relevant, please feel free to reopen it with updated information or context. We apologize for any inconvenience.