@@ -302,24 +302,9 @@ def test_pose(self):
302302
303303 original_image = image [- 3 :, - 3 :, - 1 ].flatten ()
304304
305- if torch_device == "xpu" :
306- expected_image = np .array (
307- [0.59277344 , 0.6640625 , 0.75146484 , 0.74121094 , 0.7636719 , 0.7426758 , 0.6879883 , 0.6455078 , 0.6386719 ]
308- )
309- else :
310- expected_image = np .array (
311- [
312- 0.4091797 ,
313- 0.4177246 ,
314- 0.39526367 ,
315- 0.4194336 ,
316- 0.40356445 ,
317- 0.3857422 ,
318- 0.39208984 ,
319- 0.40429688 ,
320- 0.37451172 ,
321- ]
322- )
305+ expected_image = np .array (
306+ [0.4091797 , 0.4177246 , 0.39526367 , 0.4194336 , 0.40356445 , 0.3857422 , 0.39208984 , 0.40429688 , 0.37451172 ]
307+ )
323308
324309 assert np .abs (original_image .flatten () - expected_image ).max () < 1e-2
325310
@@ -356,34 +341,9 @@ def test_depth(self):
356341
357342 original_image = image [- 3 :, - 3 :, - 1 ].flatten ()
358343
359- if torch_device == "xpu" :
360- expected_image = np .array (
361- [
362- 0.7529297 ,
363- 0.69628906 ,
364- 0.62060547 ,
365- 0.76708984 ,
366- 0.7158203 ,
367- 0.65185547 ,
368- 0.74853516 ,
369- 0.69628906 ,
370- 0.6455078 ,
371- ]
372- )
373- else :
374- expected_image = np .array (
375- [
376- 0.31982422 ,
377- 0.32177734 ,
378- 0.30126953 ,
379- 0.3190918 ,
380- 0.3100586 ,
381- 0.31396484 ,
382- 0.3232422 ,
383- 0.33544922 ,
384- 0.30810547 ,
385- ]
386- )
344+ expected_image = np .array (
345+ [0.31982422 , 0.32177734 , 0.30126953 , 0.3190918 , 0.3100586 , 0.31396484 , 0.3232422 , 0.33544922 , 0.30810547 ]
346+ )
387347
388348 assert np .abs (original_image .flatten () - expected_image ).max () < 1e-2
389349
@@ -422,33 +382,8 @@ def test_multi_controlnet(self):
422382
423383 original_image = image [- 3 :, - 3 :, - 1 ].flatten ()
424384
425- if torch_device == "xpu" :
426- expected_image = np .array (
427- [
428- 0.28320312 ,
429- 0.28125 ,
430- 0.31347656 ,
431- 0.29736328 ,
432- 0.29077148 ,
433- 0.33740234 ,
434- 0.33911133 ,
435- 0.35668945 ,
436- 0.38452148 ,
437- ]
438- )
439- else :
440- expected_image = np .array (
441- [
442- 0.43652344 ,
443- 0.44018555 ,
444- 0.4494629 ,
445- 0.44995117 ,
446- 0.45654297 ,
447- 0.44848633 ,
448- 0.43603516 ,
449- 0.4404297 ,
450- 0.42626953 ,
451- ]
452- )
385+ expected_image = np .array (
386+ [0.43652344 , 0.44018555 , 0.4494629 , 0.44995117 , 0.45654297 , 0.44848633 , 0.43603516 , 0.4404297 , 0.42626953 ]
387+ )
453388
454389 assert np .abs (original_image .flatten () - expected_image ).max () < 1e-2
0 commit comments