Merge branch 'main' into docs/fix

This commit is contained in:
Zangwei Zheng 2024-03-28 14:01:20 +08:00
commit 07eb7c25a2
2 changed files with 4 additions and 1 deletions

View file

@ -162,6 +162,7 @@ on improving the quality and text alignment.
We have provided a Gradio application in this repository, you can use the following the command to start an interactive web application to experience video generation with Open-Sora.
```bash
pip install gradio
python scripts/demo.py
```

View file

@ -22,6 +22,7 @@ class IDDPM(SpacedDiffusion):
rescale_learned_sigmas=False,
diffusion_steps=1000,
cfg_scale=4.0,
cfg_channel=None,
):
betas = gd.get_named_beta_schedule(noise_schedule, diffusion_steps)
if use_kl:
@ -49,6 +50,7 @@ class IDDPM(SpacedDiffusion):
)
self.cfg_scale = cfg_scale
self.cfg_channel = cfg_channel
def sample(
self,
@ -68,7 +70,7 @@ class IDDPM(SpacedDiffusion):
if additional_args is not None:
model_args.update(additional_args)
forward = partial(forward_with_cfg, model, cfg_scale=self.cfg_scale)
forward = partial(forward_with_cfg, model, cfg_scale=self.cfg_scale, cfg_channel=self.cfg_channel)
samples = self.p_sample_loop(
forward,
z.shape,