Skip to content

Commit

Permalink
Update sigmoid exprs
Browse files Browse the repository at this point in the history
  • Loading branch information
Setsugennoao committed Jul 31, 2024
1 parent 5316b3d commit 941642e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vskernels/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ def linear(self) -> vs.VideoNode:

if self.ll.sigmoid:
wclip = wclip.std.Expr(
f'{self.ll._scenter} 1 x {self.ll._sscale} * {self.ll._soffset} + / '
f'1 - log {self.ll._sslope} / - 0 max 1 min'
f'{self.ll._scenter} 1 {self.ll._sslope} / 1 x 0 max 1 min {self.ll._sscale} * '
f'{self.ll._soffset} + / 1 - log * -'
)

return wclip
Expand All @@ -197,8 +197,8 @@ def out(self) -> vs.VideoNode:

if self.ll.sigmoid:
processed = processed.std.Expr(
f'1 1 {self.ll._sslope} {self.ll._scenter} x - * exp + / '
f'{self.ll._soffset} - {self.ll._sscale} / 0 max 1 min'
f'1 1 {self.ll._sslope} {self.ll._scenter} x 0 max 1 min - * exp + /'
f' {self.ll._soffset} - {self.ll._sscale} /'
)

if self.ll.linear:
Expand Down

0 comments on commit 941642e

Please sign in to comment.