google-research / torchsde

Differentiable SDE solvers with GPU support and efficient sensitivity analysis.
Apache License 2.0
1.51k stars 194 forks source link

bump version number #137

Closed vladmandic closed 9 months ago

vladmandic commented 10 months ago

bumps version number of torchsde package so it can be used to create a new release and published to pypi. see #131 for details

patrick-kidger commented 10 months ago

The failing tests here are what I was referring to over in #131 btw; I think the CI needs updating.

vladmandic commented 10 months ago

The failing tests here are what I was referring to over in #131 btw; I think the CI needs updating.

yup. but updating CI is non-trivial since it has a lot of obsolete dependencies (not to mention python 3.6 itself). and you said yourself this is no longer an actively maintained package.

so we can either:

patrick-kidger commented 10 months ago

I think that's about right. I'm inclined toward the second option for now.

It has been very cool to see how much usage torchsde has received downstream! Hopefully this suggests that someone will be willing to step up to the plate and do the work to update the CI. If anyone else comes across this and wants to do the work, go for it! I'm very happy to merge fixes.

( Absent that, the main other recommendation I have for you is to use Diffrax instead. This is maintained and actively developed. Why the second library? Diffrax uses the lessons we learnt building torchsde -- which was only ever a research project -- to produce something suitable for use in production. So Diffrax is faster, generally more featureful, etc. )

JulianVolodia commented 10 months ago

Absent that, the main other recommendation I have for you is to use Diffrax instead.

any easy way to refactor from torchsde to diffrax? Have you seen models like SD1.5/SD XL 1.0 using diffrax in any context? So I could see it and try to refactor in Automatic1111 sd webui?

patrick-kidger commented 10 months ago

Great questions!

1) Is it easy to refactor?

I find refactoring to be straightforward. As someone who already knows both frameworks: for a "serious" model like a u-net, transformer, diffusion, whatever, it usually takes me about a day. Everyone's settled on the same basic set of primitives: linear layers, conv layers, and so on.

2) Are there existing implementations of SD?

I don't know of specifically a public SD implementation. It wouldn't be terribly hard, though, and we could definitely publicise that as an example if someone takes the time to implement it.

As a reference point though, there is a concise (hopefully pedagogical) diffusion implementation here.

vladmandic commented 10 months ago

Absent that, the main other recommendation I have for you is to use Diffrax instead.

any easy way to refactor from torchsde to diffrax? Have you seen models like SD1.5/SD XL 1.0 using diffrax in any context? So I could see it and try to refactor in Automatic1111 sd webui?

torchsde is used upstream in k-diffusers and as well as in diffusers - and pretty much ALL sd implementations are using first (if you're using original ldm pipeline) or the second (if you're using diffusers pipeline) for samplers implementations.

as such, pretty much NO application can refactor to switch away from torchsde. and when i say that, i mean 99% of sd install base as i'm sure there is somewhere something that uses diffrax

basically only realistic choice is if someone forks this repo and takes on maintaining it.

lxuechen commented 10 months ago

Given the discussions here, I'll try my best to find a few hours this weekend to patch the issues here, if they have not been fixed by then.

akx commented 9 months ago

@vladmandic #140 was merged, so please rebase? :)

vladmandic commented 9 months ago

@vladmandic #140 was merged, so please rebase? :)

done!

vladmandic commented 9 months ago

great stuff - now only for pypi push/refresh :)

patrick-kidger commented 9 months ago

Hurrah! I've just merged and done a push to PyPI. Lmk how things go.

lxuechen commented 9 months ago

Thanks! @akx @vladmandic @patrick-kidger

vladmandic commented 9 months ago

Hurrah! I've just merged and done a push to PyPI. Lmk how things go.

looks all good here!