Skip to content

Commit

Permalink
refactor: adjust sd estimate
Browse files Browse the repository at this point in the history
Signed-off-by: thxCode <[email protected]>
  • Loading branch information
thxCode committed Nov 29, 2024
1 parent 50baaf4 commit 551bc01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions file_estimate__stablediffusioncpp.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,9 @@ func (gf *GGUFFile) EstimateStableDiffusionCppRun(opts ...GGUFRunEstimateOption)
// https://github.com/thxCode/stable-diffusion.cpp/blob/78629d6340f763a8fe14372e0ba3ace73526a265/stable-diffusion.cpp#L2270-L2274.
//
{
wcSize := GGUFBytesScalar(50 * 1024 * 1024)
wcSize += GGUFBytesScalar(*o.SDCWidth * *o.SDCHeight * 3 * 4 /* sizeof(float) */ * 2) // RGB
e.Devices[0].Computation += wcSize
var wcSize uint32 = 50 * 1024 * 1024
wcSize += *o.SDCWidth * *o.SDCHeight * 3 * 4 /* sizeof(float) */ * 2 // RGB
e.Devices[0].Computation += GGUFBytesScalar(wcSize * uint32(ptr.Deref(o.ParallelSize, 1)))
}

// Conditioner learned conditions,
Expand Down

0 comments on commit 551bc01

Please sign in to comment.