MCPcopy Create free account
hub / github.com/ImprintLab/MedSegDiff / model_wrapper

Function model_wrapper

guided_diffusion/dpm_solver.py:155–303  ·  view source on GitHub ↗

Create a wrapper function for the noise prediction model. DPM-Solver needs to solve the continuous-time diffusion ODEs. For DPMs trained on discrete-time labels, we need to firstly wrap the model function to a noise prediction model that accepts the continuous time as the input. We suppo

(
    model,
    noise_schedule,
    model_type="noise",
    model_kwargs={},
    guidance_type="uncond",
    condition=None,
    unconditional_condition=None,
    guidance_scale=1.,
    classifier_fn=None,
    classifier_kwargs={},
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

p_sample_loop_knownMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected