[DRAFT] Mh/jk/diffusion full pipeline forecast#2396
Draft
moritzhauschulz wants to merge 29 commits into
Draft
Conversation
…ning not implemented)
MatKbauer
reviewed
May 21, 2026
Contributor
MatKbauer
left a comment
There was a problem hiding this comment.
Two small modifications, but looks good. Currently training some models to see convergence.
| tokens, posteriors = self.encoder.encoder(model_params=model_params, batch=batch) | ||
| shape = (len(batch), batch.get_num_steps(), *tokens.shape[1:]) | ||
| tokens_multi = tokens.reshape(shape) | ||
| tokens = tokens_multi[:, -1] |
Contributor
There was a problem hiding this comment.
Let's revert this back again
| # Reshape tokens to [B, T, ...] | ||
| tokens = tokens.reshape(shape) | ||
|
|
||
| if self.cf.get("fe_diffusion_model", False): |
Contributor
There was a problem hiding this comment.
To allow unconditional and non-forecast conditional training, this check should be
if self.cf.get("fe_diffusion_model_conditioning", None) == "forecast":
MatKbauer
reviewed
May 22, 2026
Contributor
MatKbauer
left a comment
There was a problem hiding this comment.
Some more suggestions to make code more robust
| self.streams = cf.streams | ||
| self.rank = cf.rank | ||
| self.world_size = cf.world_size | ||
| self.diffusion_model_conditioning = cf.fe_diffusion_model_conditioning |
| embedding_dim=self.embedding_dim, frequency_embedding_dim=self.frequency_embedding_dim | ||
| ) | ||
| self.datetime_embedder = DateTimeEncoder() | ||
| self.conditioning = self.cf.fe_diffusion_model_conditioning |
Contributor
There was a problem hiding this comment.
self.cf.get("fe_diffusion_model_conditioning", None")
| if self.cf.fe_diffusion_model_conditioning in ["date_time", "date", "time"]: | ||
| c = meta_info["ERA5"].params["timestamp"] | ||
| elif self.cf.fe_diffusion_model_conditioning == "forecast": | ||
| c = meta_info["ERA5"].params["conditioning_tokens"] # X_{t-1} as conditioning (model.py extracts last step as target, passes second-to-last here) |
Contributor
There was a problem hiding this comment.
self.conditioning in both places
| # Extract conditioning from meta_info (same as training_forward) | ||
| # Extract conditioning (mirrors training_forward). | ||
| c = None | ||
| if self.cf.fe_diffusion_model_conditioning in ["date_time", "date", "time"]: |
| qk_norm_type=self.cf.get("qk_norm_type", self.cf.norm_type), | ||
| norm_eps=self.cf.norm_eps, | ||
| attention_dtype=get_dtype(self.cf.attention_dtype), | ||
| is_dit=self.cf.fe_diffusion_model, |
Contributor
There was a problem hiding this comment.
Let's also make this a self.cf.get("fe_diffusion_model", False)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
DRAFT PR to assess diff between my conditioning branch and the current main diffusion branch.
Issue Number
Is this PR a draft? Mark it as draft.
Checklist before asking for review
./scripts/actions.sh lint./scripts/actions.sh unit-test./scripts/actions.sh integration-testlaunch-slurm.py --time 60