2 2 from ddpm import Diffusion1d 3 3 from ddpm import Unet1d, Unet2d 4 + import numpy as np 5 + import torch 4 6 5 7 model = Unet1d(dim=64, dim_mults=(1, 2, 4, 8), channels=1) 6 8 diffuser = Diffusion1d(time_steps=1000, sample_steps=10, model=model, device=...
12 + class StableDiffusion1d(object): 13 + def __init__(self, time_steps: int, sample_steps: int, unet, vae, H=None, device=None, unet_path=None) -> None: 13 14 if device is not None: 14 15 self.device = device 15 16 else: @@ -35,9 +36,13 @@ def __init__(...
To address this issue, I suggest one of the following changes: Set the default parameter forextra_in_channelsto 16. This would align with the default parameter choices forDanceDiffusionPipelineFastTests. However, the reasoning behind the choice of 16 is unclear. It would be beneficial to explain...
som-diffusion/diffusion_model_unet.py +53-12 Original file line numberDiff line numberDiff line change @@ -20,7 +20,7 @@ def conv1x1(in_planes, out_planes, stride=1, bias=True): 20 20 def normalize(num_channels): 21 21 return nn.GroupNorm(num_groups=32, num_channels=num_...