Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any one get any video result by training this project? #34

Open
double-fire-0 opened this issue Jan 8, 2024 · 6 comments
Open

Any one get any video result by training this project? #34

double-fire-0 opened this issue Jan 8, 2024 · 6 comments

Comments

@double-fire-0
Copy link

No description provided.

@chpk
Copy link

chpk commented Mar 24, 2024

yes, got reasonable results using this code, I had a training dataset of around 3,000 videos in .gif format. Ran till 100000 iterations. During the training process the model parameters will be saved to './results' folder. Using the following sampling code you can load the trained parameters and generate videos:
import torch
from video_diffusion_pytorch import Unet3D, GaussianDiffusion, Trainer, video_tensor_to_gif

batch_size = 1

model = Unet3D(
dim = 64,
cond_dim = 768,
dim_mults = (1, 2, 4, 8),
)

diffusion = GaussianDiffusion(
model,
image_size = 64,
num_frames = 10,
channels = 3,
timesteps = 1000, # number of steps
loss_type = 'l1' # L1 or L2
)

trainer = Trainer(
diffusion,
'./data')

trainer.load(-1)

input_condition = torch.randn(batch_size, 768)

output_Gif_Tensor = diffusion.sample(cond = input_condition, batch_size = batch_size)

video_tensor_to_gif(output_Gif_Tensor[0], './output.gif')

@BiswajeetRaut
Copy link

Which dataset you used ?

@chpk
Copy link

chpk commented Apr 5, 2024

custom dataset, around 10K training samples

@zzzbbt
Copy link

zzzbbt commented Apr 22, 2024

custom dataset, around 10K training samples

Can I use this model to generate growing GIFs using short GIFs?

@chpk
Copy link

chpk commented Apr 22, 2024

The input & output number of frames are fixed and this parameter can be changed during training/inference, also the current code does not support taking .gifs as condition to generate outputs based on the given condition.

@zzzbbt
Copy link

zzzbbt commented Apr 28, 2024

The input & output number of frames are fixed and this parameter can be changed during training/inference, also the current code does not support taking .gifs as condition to generate outputs based on the given condition.

When I use your sampling script, I find that the generated gif is different from the gif I sampled. Is there any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants