Add guided FLUX Klein component setup and tested image pipeline

This commit is contained in:
Mikei386
2026-09-28 23:16:01 +02:00
parent 43c8d6456c
commit 9fecb30a8f
8 changed files with 95 additions and 26 deletions
+9
View File
@@ -15,6 +15,15 @@ class ImageTestTests(unittest.TestCase):
self.assertEqual(graph['6']['inputs']['steps'],12)
self.assertEqual(graph['6']['inputs']['cfg'],1.5)
self.assertEqual(graph['5']['inputs']['height'],768)
def test_flux_graph_and_offload(self):
p=dict(width=512,height=512,steps=4,guidance=1)
graph=workflow('a red bicycle',p,42,'flux')
self.assertEqual(graph['1']['class_type'],'UNETLoader');self.assertEqual(graph['2']['inputs']['family'],'flux2')
self.assertEqual(graph['12']['class_type'],'Flux2Scheduler');self.assertEqual(graph['12']['inputs']['steps'],4)
self.assertEqual(graph['5']['class_type'],'EmptyFlux2LatentImage')
devices=[dict(name='RTX 5080',uuid='a',free_mib=16000,processes=0),dict(name='RTX 3060',uuid='b',free_mib=12000,processes=0)]
self.assertEqual(select_gpus(devices,18*1024**3,8*1024**3,400*1024**2,offload=True)[0]['uuid'],'a')
with self.assertRaises(ValueError):select_gpus(devices,18*1024**3,8*1024**3,400*1024**2)
def test_two_gpu_selection_rejects_busy_or_small_encoder_gpu(self):
devices=[dict(name='NVIDIA GeForce RTX 3060',uuid='encoder',processes=0,free_mib=11962),dict(name='NVIDIA GeForce RTX 5080',uuid='image',processes=0,free_mib=15923)]
image,encoder=select_gpus(devices,7*1024**3,9*1024**3,700*1024**2)