How to run `convert_ltx2_to_diffusers.py`

#1
by miriha - opened

I just read the issues here -> https://github.com/huggingface/diffusers/issues/12925

May I ask how you ran the convert_ltx2_to_diffusers.py for this repo?
I want to do it myself to avoid loading another xGB as I already have the original, but I am not sure how to use this script in detail to achieve your results?

cheers *miriha

miriha changed discussion title from Hello @rootonChair to How to run `convert_ltx2_to_diffusers.py`

If you have the original, you should pass None to --original_state_dict_repo_id it will prevent the downloading

Thank you @rootonchair ,I already tried multiple approach but finally studying the source I found a solution, as you now pointed out as well.

I have another question if I may?

  • Your examples do have ...
    • a first stage pipeline βœ…
    • the upsample_pipe() βœ…
    • passing the latents to the original 1st Stage pipeline? πŸ€”

The last part never runs in my case it does not even start, as it seems this pipeline already ran.
Once I run your example above I have 8+3 inference steps once the 1st Stage runs and then the upsample_pipe() is constructed and assabled, but ... this part idles and ever does anything anymore.

...
video, audio = pipe(
    latents=upscaled_video_latent,
    audio_latents=audio_latent,
    prompt=prompt,
    negative_prompt=negative_prompt,
    num_inference_steps=3,
    noise_scale=STAGE_2_DISTILLED_SIGMA_VALUES[0], # renoise with first sigma value https://github.com/Lightricks/LTX-2/blob/main/packages/ltx-pipelines/src/ltx_pipelines/distilled.py#L178
    sigmas=STAGE_2_DISTILLED_SIGMA_VALUES,
    generator=generator,
    guidance_scale=1.0,
    output_type="np",
    return_dict=False,
)
...

Could you support me here?

Sign up or log in to comment