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

Commit 26d3ecb

Browse files
committed
Fix incorrect Dimension for guidance inference
1 parent bb5ed73 commit 26d3ecb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

OnnxStack.StableDiffusion/Diffusers/StableDiffusion/StableDiffusionDiffuser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ protected override async Task<DenseTensor<float>> SchedulerStep(IModelOptions mo
7474
var inputLatent = performGuidance ? latents.Repeat(2) : latents;
7575
var inputTensor = scheduler.ScaleInput(inputLatent, timestep);
7676

77-
var outputBuffer = new DenseTensor<float>(schedulerOptions.GetScaledDimension());
77+
var outputBuffer = new DenseTensor<float>(schedulerOptions.GetScaledDimension(performGuidance ? 2 : 1));
7878
using (var outputTensorValue = outputBuffer.ToOrtValue())
7979
using (var inputTensorValue = inputTensor.ToOrtValue())
8080
using (var timestepOrtValue = CreateTimestepNamedOrtValue(inputMetaData, inputNames[1], timestep))

0 commit comments

Comments
 (0)