Coder Social home page Coder Social logo

Comments (4)

LuChengTHU avatar LuChengTHU commented on July 20, 2024

Hi @jasonrayshd ,

For cosine noise schedule, it may suffer terrible numerical issues for t near to T. In my previous implementations in DPM-Solver paper, I changed the start time from t_start=1.0 to t_start=0.9946 (by comparing the lambda, i.e. half-log-SNR). You can also try other t_start but do not use t_start=1.0. I will further support the cosine schedule in a more elegant way.

from dpm-solver.

jiachenlei avatar jiachenlei commented on July 20, 2024

Got it. Thank you for your great suggestions! Looking forward to your excellent work in the future!

from dpm-solver.

codgodtao avatar codgodtao commented on July 20, 2024

@LuChengTHU @jasonrayshd i have tried cosine scheduler, and the result is better than ddim&ddpm, but i don't know the reason about it, and i'm not sure about is observation could be seen in High dimension data.
here is the settings:
`model = self.denoise_fn
model_kwargs = {}
guidance_scale = w

    noise_schedule = NoiseScheduleVP(schedule='discrete', betas=self.betas)

    model_fn = model_wrapper(
        model,
        noise_schedule,
        model_type="noise",  # or "x_start" or "v" or "score"
        model_kwargs=model_kwargs,
        guidance_type="classifier-free",
        condition=condition,
        unconditional_condition=unconditional_condition,
        guidance_scale=guidance_scale,
    )

    dpm_solver = DPM_Solver(model_fn, noise_schedule, algorithm_type="dpmsolver++",
                            correcting_x0_fn="dynamic_thresholding")

    x_sample = dpm_solver.sample(
        x_T,
        steps=20,
        order=2,
        skip_type="logSNR",
        method="multistep",
        denoise_to_zero=True
    )

`

from dpm-solver.

LuChengTHU avatar LuChengTHU commented on July 20, 2024

Hi guys, I've fixed the numerical issue in the cosine beta schedule; please try the newest file for dpmsolver and see details in this function.

You can also try this script with the ImageNet64 (improved-DDPM checkpoint) example, which is a cosine schedule.

from dpm-solver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.