Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Question for DDIM sampling configuration

Offen
#9 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
python

Rechercherichtung

Vergleiche configs/model/base.yaml und configs/rawdata_diffusion_sampling.yaml und verfolge resolve_sampling_runner bis in src/models/diffusion/diffusion_sampling.py. Reproduziere die konfigurierte Zeitschrittfolge und untersuche, wie alphas_cumprod_prev verwendet wird. Die Aufgabe ist abgeschlossen, wenn die beabsichtigte Semantik der Startzeit bestätigt oder ein respaced-Schedule spezifiziert, implementiert und durch einen geeigneten Test abgedeckt ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Hi, thank you for releasing the PerturbDiff implementation. I noticed a possible mismatch between the DDIM sampling configuration and the training diffusion schedule.

The model is configured with a 1000-step diffusion process:

However, the default sampling configuration uses:

In [resolve_sampling_runner](https://github.com/DeepGraphLearning/PerturbDiff/blob/main/src/apps/sampling/sampling_generation_helpers.py#L23-L34), this value is passed directly to ddim_sample_loop as start_time. The DDIM loop then:

  1. Initializes the state from standard Gaussian noise:
img = noise if noise is not None else th.randn(*shape, device=device)
  1. Constructs consecutive timestep indices:
indices = list(range(start_time))[::-1]

Therefore, with the default configuration, sampling starts from pure Gaussian noise at timestep 99 and performs 100 consecutive updates:

99 -> 98 -> ... -> 1 -> 0

This behavior is implemented in [ddim_sample_loop_progressive](https://github.com/DeepGraphLearning/PerturbDiff/blob/main/src/models/diffusion/diffusion_sampling.py#L559-L590). Each DDIM update also uses alphas_cumprod_prev[t], so it specifically transitions from timestep t to the adjacent timestep t-1, rather than between respaced timesteps:

My concern is that, under the default 1000-step linear schedule, timestep 99 is not close to the terminal Gaussian distribution. The configured beta schedule gives approximately:

alpha_bar[99] = 0.897
sqrt(alpha_bar[99]) = 0.947
sqrt(1 - alpha_bar[99]) = 0.321

Therefore, the forward-process state at timestep 99 is approximately:

x_99 = 0.947 * x_0 + 0.321 * noise

In other words, the training distribution at timestep 99 still contains a strong contribution from the clean sample. The sampler instead initializes:

x_99 ~ Normal(0, I)

If the intended goal is accelerated DDIM sampling with 100 model evaluations, I would expect the sampler to select approximately 100 respaced timesteps spanning the full training horizon from 999 to 0, and to calculate each update using the previous selected timestep. The current implementation instead appears to treat start_time as both the desired number of sampling steps and the actual starting diffusion timestep.

Could you please explain the rationale for initializing pure Gaussian noise at timestep 99? Is this behavior intentional, or should the 100-step DDIM sampler use a respaced timestep sequence covering the full 1000-step training schedule?

Thank you for your time and clarification.

Vorherrschende Sprache
Python
Sterne
63
Forks
10
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus DeepGraphLearning/PerturbDiff

Alle Issues in DeepGraphLearning/PerturbDiff

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.