Skip to content
This repository was archived by the owner on Nov 27, 2024. It is now read-only.

Commit 3808cd1

Browse files
authored
Merge pull request #36 from james-s-tayler/remove_hash_from_tests
Removing hash as it is different between tests despite the image being the same.
2 parents 8df2118 + d40af8f commit 3808cd1

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

OnnxStack.IntegrationTests/StableDiffusionTests.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ public async Task GivenAStableDiffusionModel_WhenLoadModel_ThenModelIsLoaded(str
5555
}
5656

5757
[Theory]
58-
[InlineData(StableDiffusionModel, SchedulerType.EulerAncestral, 10, 7.0f, "E518D0E4F67CBD5E93513574D30F3FD7")]
59-
[InlineData(LatentConsistencyModel, SchedulerType.LCM, 4, 1.0f, "3554E5E1B714D936805F4C9D890B0711")]
58+
[InlineData(StableDiffusionModel, SchedulerType.EulerAncestral, 10, 7.0f)]
59+
[InlineData(LatentConsistencyModel, SchedulerType.LCM, 4, 1.0f)]
6060
public async Task GivenTextToImage_WhenInference_ThenImageGenerated(string modelName, SchedulerType schedulerType,
61-
int inferenceSteps, float guidanceScale, string generatedImageMd5Hash)
61+
int inferenceSteps, float guidanceScale)
6262

6363
{
6464
//arrange
@@ -118,12 +118,6 @@ public async Task GivenTextToImage_WhenInference_ThenImageGenerated(string model
118118
image.Height.Should().Be(512);
119119

120120
File.Exists(fileName).Should().BeTrue();
121-
var md5 = MD5.Create();
122-
var hash = md5.ComputeHash(File.ReadAllBytes(fileName));
123-
var hashString = string.Join("", hash.Select(b => b.ToString("X2")));
124-
_logger.LogInformation($"MD5 Hash of generated image: {hashString}");
125-
126-
hashString.Should().Be(generatedImageMd5Hash);
127121
}
128122
}
129123
}

0 commit comments

Comments
 (0)