Skip to content

Commit

Permalink
Fixed bug where changing image size in config wouldnt change anything…
Browse files Browse the repository at this point in the history
…. Also Unet sometimes not loading
  • Loading branch information
PolarFred committed Apr 12, 2024
1 parent 914285c commit 031370c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions led/pipelines/led_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class LEDPipeline(DiffusionPipeline):
def __init__(self, unet=None, scheduler=None, base_pipeline='ddim', backend=None, num_cond_steps=800, image_size=512):
super().__init__()
# make sure scheduler can always be converted to DDIM (basically)
self.unet = unet
if scheduler is None:
scheduler = self._set_default_scheduler()
if unet is None:
Expand Down
1 change: 1 addition & 0 deletions led/trainers/led_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ def train(self):
pipeline = LEDPipeline(
unet=unwrap_model,
scheduler=self.noise_scheduler,
image_size=self.config.data.image_size,
)
generator = torch.Generator(device=pipeline.device).manual_seed(0)
# run pipeline in inference (sample random noise and denoise)
Expand Down

0 comments on commit 031370c

Please sign in to comment.