From d40af8f36da44155968dfda3afef1b4af90e1b32 Mon Sep 17 00:00:00 2001 From: James Tayler Date: Sat, 18 Nov 2023 23:12:08 +1300 Subject: [PATCH] Removing hash as it is different between tests despite the image looking the same. --- OnnxStack.IntegrationTests/StableDiffusionTests.cs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/OnnxStack.IntegrationTests/StableDiffusionTests.cs b/OnnxStack.IntegrationTests/StableDiffusionTests.cs index 0726e16a..161c7ed9 100644 --- a/OnnxStack.IntegrationTests/StableDiffusionTests.cs +++ b/OnnxStack.IntegrationTests/StableDiffusionTests.cs @@ -55,10 +55,10 @@ public async Task GivenAStableDiffusionModel_WhenLoadModel_ThenModelIsLoaded(str } [Theory] - [InlineData(StableDiffusionModel, SchedulerType.EulerAncestral, 10, 7.0f, "E518D0E4F67CBD5E93513574D30F3FD7")] - [InlineData(LatentConsistencyModel, SchedulerType.LCM, 4, 1.0f, "3554E5E1B714D936805F4C9D890B0711")] + [InlineData(StableDiffusionModel, SchedulerType.EulerAncestral, 10, 7.0f)] + [InlineData(LatentConsistencyModel, SchedulerType.LCM, 4, 1.0f)] public async Task GivenTextToImage_WhenInference_ThenImageGenerated(string modelName, SchedulerType schedulerType, - int inferenceSteps, float guidanceScale, string generatedImageMd5Hash) + int inferenceSteps, float guidanceScale) { //arrange @@ -118,12 +118,6 @@ public async Task GivenTextToImage_WhenInference_ThenImageGenerated(string model image.Height.Should().Be(512); File.Exists(fileName).Should().BeTrue(); - var md5 = MD5.Create(); - var hash = md5.ComputeHash(File.ReadAllBytes(fileName)); - var hashString = string.Join("", hash.Select(b => b.ToString("X2"))); - _logger.LogInformation($"MD5 Hash of generated image: {hashString}"); - - hashString.Should().Be(generatedImageMd5Hash); } } } \ No newline at end of file