8000 Can’t utilize for Shorter Generations · Issue #20 · thu-ml/RIFLEx · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Can’t utilize for Shorter Generations #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gurushop opened this issue Apr 9, 2025 · 3 comments
Open

Can’t utilize for Shorter Generations #20

gurushop opened this issue Apr 9, 2025 · 3 comments

Comments

@gurushop
Copy link
gurushop commented Apr 9, 2025

Wouldn’t it be possible to set when riflex jumps in? Rather than having to do a 132+ frame output, shouldn’t it be possible to set it double day a 60 frame output?

@zhuhz22
Copy link
Collaborator
zhuhz22 commented Apr 10, 2025

Hi @gurushop , thank you for your attention to our work.

I understand that your issue is that "If I want to generate videos shorter than N_k, how to ban the introduction of RIFLEx in the code". Actually, you can directly set args.num_frames to your ideal num_frames, and if (args.num_frames-1)//4+1 < N_k (i.e., so short that it's unnecessary to introduce RIFLEx), then our code is equal to the baseline without RIFLEx (i.e., the original code from the official repository).

The above judgement is defined at

if L_test > args.N_k and not args.finetune:

    # For training-free, if extrapolate length exceeds the period of intrinsic frequency, modify RoPE
    if L_test > args.N_k and not args.finetune:
        pipe.transformer.rope = HunyuanVideoRotaryPosEmbedRifleX(args.k, L_test, original_rope.patch_size, original_rope.patch_size_t, original_rope.rope_dim,original_rope.theta)

So only if L_test > args.N_k will RIFLEx be applied.

@gurushop
Copy link
Author

I suppose these issue requests are for the technically advanced. I see what you mean, but say for example on a lower VRAM card, you’re only capable of generating a 61F output without overloading the memory getting an OOM.

Am I understanding it correctly that the use of riflex could be set to double that output at the same VRAM to 122F for example?

Any way to change the setting you mentioned through comfyui or is modifying that file the only way.

Thanks.

@zhuhz22
Copy link
Collaborator
zhuhz22 commented Apr 10, 2025

RIFLEx i 5FC6 s an approach that addresses length extrapolation from the perspective of the fundamental capabilities of generative models, rather than being a work in the field of efficient machine learning. RIFLEx focuses on solving the content repetition problem faced by the baseline while consuming the same computational resources as the baseline, rather than on extending the generation length under the same resource constraints.

We might be able to tackle the efficiency issue in our future work, and thank your for proposing such a need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0