mirror of
https://github.com/hpcaitech/Open-Sora.git
synced 2026-04-15 11:52:47 +02:00
Merge branch 'main' into docs/fix
This commit is contained in:
commit
07eb7c25a2
|
|
@ -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
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue