Skip to content

Commit

Permalink
Merge pull request #3 from TehGreatFred/main
Browse files Browse the repository at this point in the history
Fixed bug where changing image size in config wouldnt change anything…
  • Loading branch information
QtacierP authored Apr 13, 2024
2 parents 914285c + 031370c commit c0755cd
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 c0755cd

Please sign in to comment.