lllyasviel / lllyasviel/FramePack
Bug: "demo_gradio_f1.py" => "TypeError: save_bcthw_as_mp4() got an unexpected keyword argument 'crf'"
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17.3k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
Hello!
"demo_gradio.py" works fine, but when I tried to run "demo_gradio_f1.py," I got this fatal error:
D:\framepack_cu126_torch26\framepack_cu126_torch26>cd D:\framepack_cu126_torch26\framepack_cu126_torch26\webui
D:\framepack_cu126_torch26\framepack_cu126_torch26\webui>"D:\framepack_cu126_torch26\framepack_cu126_torch26\system\python\python.exe" demo_gradio_f1.py --server 127.0.0.1 --inbrowser
Currently enabled native sdp backends: ['flash', 'math', 'mem_efficient', 'cudnn']
Xformers is not installed!
Flash Attn is not installed!
Sage Attn is not installed!
Namespace(share=False, server='127.0.0.1', port=None, inbrowser=True)
Free VRAM 3.212597656995058 GB
High-VRAM Mode: False
Downloading shards: 100%|██████████████████████████████████████████████████████████████| 4/4 [00:00<00:00, 3828.67it/s]
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████| 4/4 [00:01<00:00, 2.52it/s]
config.json: 100%|█████████████████████████████████████████████████████████████████████| 658/658 [00:00<00:00, 742kB/s]
D:\framepack_cu126_torch26\framepack_cu126_torch26\system\python\lib\site-packages\huggingface_hub\file_download.py:144: UserWarning: `huggingface_hub` cache-system uses symlinks by default to efficiently store duplicated files but your machine does not support them in D:\framepack_cu126_torch26\framepack_cu126_torch26\webui\hf_download\hub\models--lllyasviel--FramePack_F1_I2V_HY_20250503. Caching files will still work but in a degraded version that might require more space on your disk. This warning can be disabled by setting the `HF_HUB_DISABLE_SYMLINKS_WARNING` environment variable. For more details, see https://huggingface.co/docs/huggingface_hub/how-to-cache#limitations.
To support symlinks on Windows, you either need to activate Developer Mode or to run Python as an administrator. In order to activate developer mode, see this article: https://docs.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development
warnings.warn(message)
(…)ion_pytorch_model.safetensors.index.json: 100%|██████████████████████████████████| 134k/134k [00:00<00:00, 1.51MB/s]
(…)pytorch_model-00003-of-00003.safetensors: 100%|████████████████████████████████| 5.79G/5.79G [02:45<00:00, 35.0MB/s]
(…)pytorch_model-00002-of-00003.safetensors: 100%|████████████████████████████████| 9.99G/9.99G [04:03<00:00, 41.1MB/s]
(…)pytorch_model-00001-of-00003.safetensors: 100%|████████████████████████████████| 9.97G/9.97G [04:06<00:00, 40.5MB/s]
Fetching 3 files: 100%|██████████████████████████████████████████████████████████████████| 3/3 [04:06<00:00, 82.27s/it]
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████| 3/3 [00:02<00:00, 1.11it/s]
transformer.high_quality_fp32_output_for_inference = True
* Running on local URL: http://127.0.0.1:7860
To create a public link, set `share=True` in `launch()`.
Unloaded DynamicSwap_LlamaModel as complete.
Unloaded CLIPTextModel as complete.
Unloaded SiglipVisionModel as complete.
Unloaded AutoencoderKLHunyuanVideo as complete.
Unloaded DynamicSwap_HunyuanVideoTransformer3DModelPacked as complete.
Loaded CLIPTextModel to cuda:0 as complete.
Unloaded CLIPTextModel as complete.
Loaded AutoencoderKLHunyuanVideo to cuda:0 as complete.
Unloaded AutoencoderKLHunyuanVideo as complete.
Loaded SiglipVisionModel to cuda:0 as complete.
section_index = 0, total_latent_sections = 4
Unloaded SiglipVisionModel as complete.
Moving DynamicSwap_HunyuanVideoTransformer3DModelPacked to cuda:0 with preserved memory: 6 GB
100%|███████████████████████████████████████████████████████████████████████████████| 25/25 [1:35:37<00:00, 229.49s/it]
Offloading DynamicSwap_HunyuanVideoTransformer3DModelPacked from cuda:0 to preserve memory: 8 GB
Loaded AutoencoderKLHunyuanVideo to cuda:0 as complete.
Unloaded AutoencoderKLHunyuanVideo as complete.
**_Traceback (most recent call last):
File "D:\framepack_cu126_torch26\framepack_cu126_torch26\webui\demo_gradio_f1.py", line 283, in worker
save_bcthw_as_mp4(history_pixels, output_filename, fps=30, crf=mp4_crf)
TypeError: save_bcthw_as_mp4() got an unexpected keyword argument 'crf'_**
Unloaded DynamicSwap_LlamaModel as complete.
Unloaded CLIPTextModel as complete.
Unloaded SiglipVisionModel as complete.
Unloaded AutoencoderKLHunyuanVideo as complete.
Unloaded DynamicSwap_HunyuanVideoTransformer3DModelPacked as complete.
so.....
i open "demo_gradio_f1.py," in notepad++
and go to the line 284:
save_bcthw_as_mp4(history_pixels, output_filename, fps=30, crf=mp4_crf)
I know that "demo_gradio.py" work very well.....
I search the same instructions in "demo_gradio.py"
Found this line 298:
save_bcthw_as_mp4(history_pixels, output_filename, fps=30)
So ........ i will try to erase "crf=mp4_crf" in the script of demo_gradio_f1.py to solve this bug ....
I will tale you later if it's work.
Thanks !
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in webui/demo_gradio_f1.py at the worker call on line 283 and compare it with the save_bcthw_as_mp4 call in webui/demo_gradio.py around line 298. Check the function signature used by both paths, then run demo_gradio_f1.py and confirm that video export completes without the TypeError and produces the expected MP4.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100