Repository navigation
Add EdenLive - #15066
Add EdenLive#15066skygoo2000 wants to merge 9 commits into
Conversation
|
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. 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 |
|
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
left a comment
There was a problem hiding this comment.
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.""" |
There was a problem hiding this comment.
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( |
| 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): |
There was a problem hiding this comment.
can we not override from_pretrained?
|
@skygoo2000 |
Thanks @yiyixuxu! We've updated the PR to address your comments: removed streaming, additional initialization helper, and the We also ran the self-review and addressed the integration issues you highlighted. Please take another look when you have a chance! |
|
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
left a comment
There was a problem hiding this comment.
thanks!
i left some comments
| four fixed denoising steps per chunk. | ||
|
|
||
| ```python | ||
| from diffusers import EdenLiveCausalPipeline, EdenLiveTransformer3DModel, EdenLiveFlowMatchEulerDiscreteScheduler |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
| class EdenLiveCausalAttnProcessor(EdenLiveAttnProcessor): | |
| class EdenLiveCausalAttnProcessor: |
| return attn.to_out[1](attn.to_out[0](output)) | ||
|
|
||
|
|
||
| class EdenLiveProxyProjection(ModelMixin, ConfigMixin): |
There was a problem hiding this comment.
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): |
| 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() |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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: |
bugfix: device_map, offload, and BF16 handling.
|
Thanks again for the detailed feedback @yiyixuxu. We've updated the implementation for these issues:
We also reran the repository self-review, and found no remaining code issues. |
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:
EdenLivePipelineandEdenLiveCausalPipelineclasses for bidirectional and causal generation.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.
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:
A self-review was completed against the Diffusers contribution guidelines.