Skip to content

Add EdenLive - #15066

Open
skygoo2000 wants to merge 9 commits into
huggingface:mainfrom
skygoo2000:edenlive
Open

skygoo2000 wants to merge 9 commits into
huggingface:mainfrom
skygoo2000:edenlive

Conversation

@skygoo2000

@skygoo2000 skygoo2000 commented Oct 16, 2026 •

Copy link
Copy Markdown

What does this PR do?

Adds support for EdenLive, a generative rendering model that produces video from a reference image, an RGB proxy video, and a text prompt.

This integration includes:

  • EdenLivePipeline and EdenLiveCausalPipeline classes for bidirectional and causal generation.
  • The EdenLive transformer, DINOv3 proxy conditioning, flow-matching scheduler, and LightTAE decoder.
  • Documentation, tests, CPU offloading, and inference examples using context parallelism and FSDP2 on multiple GPUs.

Diffusers checkpoints are available on the Hub:

Basic usage

The example below uses the 5B bidirectional model. Prepare a reference image and a proxy video containing at least 49 frames sampled at 24 fps.

import torch
from diffusers import EdenLivePipeline
from diffusers.utils import export_to_video, load_image, load_video

pipe = EdenLivePipeline.from_pretrained(
    "VAST-AI/EdenLive-5B-Diffusers",
    torch_dtype={
        "default": torch.bfloat16,
        "proxy_encoder": torch.float32,
        "proxy_projection": torch.float32,
    },
).to("cuda")

frames = pipe(
    image=load_image("reference.png"),
    video=load_video("proxy-24fps.mp4"),
    prompt="A character explores a snowy landscape.",
    num_frames=49,
).frames[0]

export_to_video(frames, "edenlive.mp4", fps=24)

See the pipeline documentation and examples/edenlive for causal generation, changing prompts between chunks, LightTAE decoding, and multi-GPU inference.

Demo

comparison.1.mp4

Validation

Local refactor validation included:

  • Standard model and pipeline tests covering loading, saving, offloading, compilation, dynamic prompts, and cache cleanup.
  • Context parallelism and FSDP2 tests on 2/4/8 A800 GPUs.
    A self-review was completed against the Diffusers contribution guidelines.

@github-actions github-actions Bot added documentation Improvements or additions to documentation models tests utils pipelines examples schedulers size/L PR with diff > 200 LOC labels Oct 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi @skygoo2000, thanks for the PR! It does not appear to link an issue it fixes. If this PR addresses an existing issue, please add a closing keyword (e.g. Fixes #1234) to the PR description so the issue is linked. See the contribution guide for more details. If this PR intentionally does not fix a tracked issue, a maintainer can add the no-issue-needed label to silence this reminder.

Please note that PRs without a linked issue are likely to be automatically closed 10 days after this notice.

Once the PR links an issue (or gets the no-issue-needed label), you can ignore this message — it stays here as a comment, but it no longer applies.

@yiyixuxu yiyixuxu added the no-issue-needed for PRs that do not require link to an issue label Oct 17, 2026
@skygoo2000

Copy link
Copy Markdown
Author

Hi @yiyixuxu, thanks for adding the label! Could you take a look at this PR, or help suggest the right reviewer for the EdenLive integration? Happy to make any changes needed.

@yiyixuxu yiyixuxu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i left some initial comments
additionally, is it possible to remove the streaming out of the official pipeline?

# See the License for the specific language governing permissions and
# limitations under the License.

"""Read the four original EdenLive releases without writing converted checkpoints."""

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we remove this?
the checkpoint should be converted into diffusers format and then our from_pretrained() should be able to work out of box

super().__init__()
if chunk_size < 1 or sink_frames < 0 or max_context_frames < sink_frames + chunk_size:
raise ValueError("The context must fit the sink and a positive-size chunk.")
utils.initialize_pipeline(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we remove this?

self.register_to_config(chunk_size=chunk_size, max_context_frames=max_context_frames, sink_frames=sink_frames)

@classmethod
def from_pretrained(cls, pretrained_model_name_or_path, *, profile=None, **kwargs):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we not override from_pretrained?

@yiyixuxu

Copy link
Copy Markdown
Collaborator

@skygoo2000
the PR deviates a lot from our standard and requirement, are you able to run a self-review? (see guide here https://huggingface.co/docs/diffusers/v0.41.0/en/conceptual/contribution#coding-with-ai-agents)

@skygoo2000

Copy link
Copy Markdown
Author

@skygoo2000 the PR deviates a lot from our standard and requirement, are you able to run a self-review? (see guide here https://huggingface.co/docs/diffusers/v0.41.0/en/conceptual/contribution#coding-with-ai-agents)

Thanks @yiyixuxu!

We've updated the PR to address your comments: removed streaming, additional initialization helper, and the from_pretrained override. Checkpoint conversion is now handled by a standalone script, and both pipelines use standard Diffusers loading.

We also ran the self-review and addressed the integration issues you highlighted. Please take another look when you have a chance!

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@yiyixuxu yiyixuxu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!
i left some comments

four fixed denoising steps per chunk.

```python
from diffusers import EdenLiveCausalPipeline, EdenLiveTransformer3DModel, EdenLiveFlowMatchEulerDiscreteScheduler

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we recommend one repo per checkpoint, so probably would work better if casual has it own repo

return attn.to_out[1](attn.to_out[0](output))


class EdenLiveCausalAttnProcessor(EdenLiveAttnProcessor):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
class EdenLiveCausalAttnProcessor(EdenLiveAttnProcessor):
class EdenLiveCausalAttnProcessor:

return attn.to_out[1](attn.to_out[0](output))


class EdenLiveProxyProjection(ModelMixin, ConfigMixin):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this not part of the transformer?

self.scale_shift_table = nn.Parameter(torch.randn(1, 2, inner_dim) / inner_dim**0.5)
self.gradient_checkpointing = False

def _context_parallel_info(self):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we remove this?

raise ValueError("The context must contain the current chunk and be larger than its nonnegative sink.")
if max_context_frames % chunk_size or sink_frames % chunk_size:
raise ValueError("The fixed context and sink must contain whole chunks.")
cp_size, cp_rank = self._context_parallel_info()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so our model implementations should not be aware of complex parallelism. cp support should come in with _cp_plan

I think our cp does not yet support kv cache,, we are still working on adding that in a general way. but individual models shouild not implement their own version. could you remove all the cp stuff from the PR?

"""Per-rollout, per-guidance-branch KV storage. Positions count latent frames."""

layers: list[_EdenLiveLayerCache]
batch_size: int

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does the cache container need all of these info like height/width etc?

)
if batch_size < 1:
raise ValueError("Provide a positive prompt or prompt embeddings.")
try:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we remove this?

bugfix: device_map, offload, and BF16 handling.
@skygoo2000

Copy link
Copy Markdown
Author

Thanks again for the detailed feedback @yiyixuxu.

We've updated the implementation for these issues:

  1. remove custom cp and simplify the KV cache state.
  2. move the projection module into the transformer.
  3. remove 'try' wrappers in pipeline.
  4. split 5B/14B bidirectional and causal models.

We also reran the repository self-review, and found no remaining code issues.
I'd appreciate another look at the code changes. Thanks again!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation examples models no-issue-needed for PRs that do not require link to an issue pipelines schedulers size/L PR with diff > 200 LOC tests utils

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants