Skip to content

Conversation

@tolgacangoz
Copy link
Contributor

@tolgacangoz tolgacangoz commented Mar 30, 2025

Thanks for opening this issue to the community to fix #11147!

Enhance the LTXConditionPipeline to support text-only conditioning while maintaining compatibility with image and/or video conditionings.

NOTE: I haven't concluded this PR 100% yet, but it can be reviewed if it is a priority. The PR has been approved.

Open In Colab

import torch
from diffusers import LTXConditionPipeline
from diffusers.utils import export_to_video

pipe = LTXConditionPipeline.from_pretrained("Lightricks/LTX-Video-0.9.5", torch_dtype=torch.bfloat16)
pipe.vae.enable_tiling()
pipe.to('cuda')

prompt = "A woman with long brown hair and light skin smiles at another woman with long blonde hair. The woman with brown hair wears a black jacket and has a small, barely noticeable mole on her right cheek. The camera angle is a close-up, focused on the woman with brown hair's face. The lighting is warm and natural, likely from the setting sun, casting a soft glow on the scene. The scene appears to be real-life footage"
negative_prompt = "worst quality, inconsistent motion, blurry, jittery, distorted"

video = pipe(
    prompt=prompt,
    negative_prompt=negative_prompt,
    width=768,
    height=512,
    num_frames=161,
    num_inference_steps=40,
).frames[0]
export_to_video(video, "output.mp4", fps=24)
Exp1 Exp2
output.2.mp4
output.1.mp4
Exp3 Exp4
output.mp4
output.3.mp4

@yiyixuxu @a-r-r-o-w

@tolgacangoz tolgacangoz marked this pull request as ready for review March 30, 2025 16:25
@nitinmukesh
Copy link

Thank you @tolgacangoz

@yiyixuxu
Copy link
Collaborator

thanks @tolgacangoz !

Copy link
Contributor

@a-r-r-o-w a-r-r-o-w left a comment

Choose a reason for hiding this comment

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

Thanks @tolgacangoz, super cool! Change LGTM - could you share an example generation in description too? 🤗

@HuggingFaceDocBuilderDev

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.

@tolgacangoz tolgacangoz requested a review from a-r-r-o-w April 1, 2025 11:01
@tolgacangoz tolgacangoz requested a review from a-r-r-o-w April 3, 2025 17:02
@tolgacangoz tolgacangoz changed the title Refactor LTXConditionPipeline for text-only conditioning [LTX0.9.5] Refactor LTXConditionPipeline for text-only conditioning Apr 4, 2025
Copy link
Contributor

@a-r-r-o-w a-r-r-o-w left a comment

Choose a reason for hiding this comment

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

Thanks for the awesome work!

@a-r-r-o-w
Copy link
Contributor

Failing tests look unrelated

@a-r-r-o-w a-r-r-o-w merged commit 13e4849 into huggingface:main Apr 4, 2025
10 of 12 checks passed
@tolgacangoz
Copy link
Contributor Author

Thanks for reviewing and merging!

@tolgacangoz tolgacangoz deleted the make-LTX0.9.5-works-with-text-to-video branch April 4, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[LTX0.9.5] make LTX0.9.5 works with text-to-video

5 participants