Skip to content

Conversation

@brandon929
Copy link
Owner

No description provided.

…Updated demo_gradio.py to handle memory checks and model precision based on device type. Modified memory.py to support MPS with fixed memory estimates. Adjusted hunyuan_video_packed.py to create tensors on the same device as input. Updated README.md for clearer installation instructions for CUDA and MPS.
…ls.py with new resolution options

- Introduced `--output_dir` argument in demo_gradio.py for customizable output folder.
- Adjusted image processing resolution to 480 in demo_gradio.py.
- Expanded bucket_tools.py with additional resolution options for better image handling.
…justments

- Modified total latent sections calculation to use a frame rate of 24 instead of 30.
- Updated video length description and output file saving function to align with the new frame rate.
- Added `--resolution_bucket` and `--fp32` arguments for customizable image processing and model precision.
- Updated memory management for MPS devices to use recommended maximum memory.
- Adjusted GPU memory preservation slider visibility based on high VRAM mode.
- Renamed `--resolution_bucket` argument to `--resolution` for clarity in demo_gradio.py.
- Updated image processing logic to utilize the new resolution argument.
- Simplified bucket_options in bucket_tools.py by removing resolution-specific keys, allowing for more flexible resolution handling.
…macOS

- Renamed installation section for NVIDIA GPUs to improve clarity.
- Added detailed installation steps for macOS, including Python 3.10 installation via Homebrew.
- Included new arguments for starting FramePack on macOS, enhancing user guidance for configuration options.
- Updated resolution handling information to reflect changes in default settings and recommendations for M1/M2 processors.
@brandon929 brandon929 closed this Apr 20, 2025
@brandon929 brandon929 deleted the macSupport branch April 20, 2025 06:34
@donghao1393
Copy link

donghao1393 commented Apr 20, 2025

As suggested by lllyasviel#170 (comment), this works on my Mac with a fair speed on rendering.

I run it by pointing to a local pytorch folder with pytorch/pytorch#151742 and pytorch/pytorch#151760 applied so that full MPS could be working. Below is the full log of the generation of one video. You can see that the the cost is less than 20 seconds / frame. And the output is good.

250420_224623_192_5524_28.mp4
FramePack-macos on  main [?] via 🐍 v3.10.16 (env) took 4s
󰄛 ❯ python demo_gradio.py
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='0.0.0.0', port=None, inbrowser=False, output_dir='./outputs', fp32=False)
Free VRAM 96.0 GB
High-VRAM Mode: True
Downloading shards: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [00:00<00:00, 2892.12it/s]
Loading checkpoint shards: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [00:00<00:00, 15.59it/s]
Fetching 3 files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 62291.64it/s]
Loading checkpoint shards: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 19.55it/s]
transformer.high_quality_fp32_output_for_inference = True
* Running on local URL:  http://0.0.0.0:7860

To create a public link, set `share=True` in `launch()`.
Resolution: 336 x 496
latent_padding_size = 18, is_last_section = False
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 25/25 [05:41<00:00, 13.67s/it]
Decoded. Current latent shape torch.Size([1, 16, 9, 62, 42]); pixel shape torch.Size([1, 3, 33, 496, 336])
latent_padding_size = 9, is_last_section = False
huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
        - Avoid using `tokenizers` before the fork if possible
        - Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 25/25 [07:12<00:00, 17.29s/it]
Decoded. Current latent shape torch.Size([1, 16, 18, 62, 42]); pixel shape torch.Size([1, 3, 69, 496, 336])
latent_padding_size = 0, is_last_section = True
huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
        - Avoid using `tokenizers` before the fork if possible
        - Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 25/25 [08:21<00:00, 20.06s/it]
Decoded. Current latent shape torch.Size([1, 16, 28, 62, 42]); pixel shape torch.Size([1, 3, 109, 496, 336])
huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
        - Avoid using `tokenizers` before the fork if possible
        - Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)
huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
        - Avoid using `tokenizers` before the fork if possible
        - Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)
^CKeyboard interruption in main thread... closing server.

FramePack-macos on  main [?] via 🐍 v3.10.16 (env) took 31m27s
󰄛 ❯

Just for your reference.
Thank you for your work.

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

Successfully merging this pull request may close these issues.

3 participants