mindspore-lab / mindone

one for all, Optimal generator with No Exception
Apache License 2.0
329 stars 63 forks source link

opensora_cai 的diffusion_util.py 178 行请参考我的改法改成静态图可运行的形式 #464

Open lrq1023 opened 2 months ago

lrq1023 commented 2 months ago

return 0.5 (1.0 + ops.tanh(Tensor(np.sqrt(2.0 / np.pi)) (x + 0.044715 * ops.pow(x, 3))))

return 0.5 (1.0 + ops.tanh(ms.numpy.sqrt(2.0 / ms.numpy.pi) (x + 0.044715 * ops.pow(x, 3))))