pku-yuangroup / magictime Goto Github PK
View Code? Open in Web Editor NEWMagicTime: Time-lapse Video Generation Models as Metamorphic Simulators
Home Page: https://pku-yuangroup.github.io/MagicTime/
License: Apache License 2.0
MagicTime: Time-lapse Video Generation Models as Metamorphic Simulators
Home Page: https://pku-yuangroup.github.io/MagicTime/
License: Apache License 2.0
I tried increase fames to 24 or more, it seems the model can not support.
i install everything correctly and when i want to run an inference , i get this error.
People on the net with the same error told me that it can be corrupted file so i download everything again ( multiple time and i keep getting this error) here the full error message
Traceback (most recent call last):
File "/home/azureuser/localfiles/MagicTime/inference_magictime.py", line 249, in
main(args)
File "/anaconda/envs/magictime/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/home/azureuser/localfiles/MagicTime/inference_magictime.py", line 61, in main
text_encoder = CLIPTextModel.from_pretrained(model_config.pretrained_model_path, subfolder="text_encoder").cuda()
File "/anaconda/envs/magictime/lib/python3.10/site-packages/transformers/modeling_utils.py", line 3284, in from_pretrained
with safe_open(resolved_archive_file, framework="pt") as f:
safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooLarge
Running inference on ubutnu 22.04 with an NVIDIA 3080 (12GB), getting:
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 1.25 GiB. GPU 0 has a total capacity of 11.75 GiB of which 1.08 GiB is free. Including non-PyTorch memory, this process has 9.95 GiB memory in use. Of the allocated memory 9.51 GiB is allocated by PyTorch, and 139.25 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)
Looking for ways to tune configuration so OOM does not happen.
Hello, what video card or processor will it work on, please answer
Hi,
Thanks for releasing this amazing project!
MagicTime is licensed under Apache 2.0, but it says "The service is a research preview intended for non-commercial use only. Please contact us if you find any potential violations."
Apache 2.0 is an open source license, which inherently allows commercial use. But this statement seems to conflict the license.
Would you mind clarifying?
Thank you!
Probably there is a difference in the current developer "internal" build vs what got released to OSS. The issues are identified below with solution:
Hello, on which video card or processor to install, please answer.
During requirements install
ERROR: Could not find a version that satisfies the requirement triton (from versions: none)
ERROR: No matching distribution found for triton
Hi authors, thank you for your nice work!
I am confused about the Cascade Preprocessing present in the paper. Could you explain more about the motivations as well as the definition of transiation point? Thanks.
(magictime) root@autodl-container-e3fa488242-5bb059c5:~/autodl-tmp/MagicTime# python app.py --port 6006
loaded 3D unet's pretrained weights from ./ckpts/Base_Model/stable-diffusion-v1-5/unet ...
loaded 3D unet's pretrained weights from ./ckpts/Base_Model/stable-diffusion-v1-5/unet ...
2024-04-15 13:52:45,055 - modelscope - INFO - PyTorch version 2.2.2 Found.
2024-04-15 13:52:45,055 - modelscope - INFO - Loading ast index from /root/.cache/modelscope/ast_indexer
2024-04-15 13:52:45,087 - modelscope - INFO - Loading done! Current index file version is 1.13.3, with md5 1d4b83741562033e1de185bbe18433db and a total number of 972 components indexed
Traceback (most recent call last):
File "/root/autodl-tmp/MagicTime/app.py", line 235, in
controller = MagicTimeController()
File "/root/autodl-tmp/MagicTime/app.py", line 105, in init
self.update_dreambooth(self.dreambooth_list[0])
File "/root/autodl-tmp/MagicTime/app.py", line 149, in update_dreambooth
magic_adapter_s_state_dict = torch.load(magic_adapter_s_path, map_location="cpu")
File "/root/miniconda3/envs/magictime/lib/python3.10/site-packages/torch/serialization.py", line 1040, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/root/miniconda3/envs/magictime/lib/python3.10/site-packages/torch/serialization.py", line 1258, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, 'v'.
app.py的运行完全是按照官网教程部署的。所有缺失的模型都已经安装,但是还是出现了这个错误,麻烦解决一下子。
During base prepare
git clone https://huggingface.co/runwayml/stable-diffusion-v1-5 ckpts/Base_Model
Encountered (N) file(s) that may not have been copied correctly on Windows
Related issue discussed.
I think this can be treated as a warning.
from multiprocessing.context import ForkProcess
ImportError: cannot import name 'ForkProcess' from 'multiprocessing.context' (D:\Python\lib\multiprocessing\context.py)
ForkProcess only on Unix? Any chance you can patch it for Windows compatibility too?
Also what does the video_length=16
imply? Is that number of frames? Tried changing it to 32 but it just seems to generate blank videos. Example:
Hi, thanks for your nice work. I want to know how to use MagicTime for image animation. Hoping for your reply!
Triggered "warning" during inference run on Ubuntu 22.04. Considering this issue as a warning unless someone says the warning should be treated as an error. Possibly there are some extra dev / optional modules not installed.
miniforge3/envs/magictime/lib/python3.10/site-packages/torch/nn/modules/conv.py:456: UserWarning: Attempt to open cnn_infer failed: handle=0 error: libcudnn_cnn_infer.so.8: cannot open shared object file: No such file or directory (Triggered internally at ../aten/src/ATen/native/cudnn/Conv_v8.cpp:78.)
我做了 WebPilot,以及「赛博禅心」,求交流,发了邮件了~
Pickle error on Linux ubuntu 22.04.
Will investigate.
10:42 $ python inference_magictime.py --config sample_configs/RealisticVision.yaml
The results will be save to outputs/RealisticVision-7
Use MagicAdapter-S
Use MagicAdapter-T
Use Magic_Text_Encoder
loaded 3D unet's pretrained weights from ./ckpts/Base_Model/stable-diffusion-v1-5/unet ...
### missing keys: 560;
### unexpected keys: 0;
### Motion Module Parameters: 417.1376 M
load motion module from ./ckpts/Base_Model/motion_module/motion_module.ckpt
load dreambooth model from ./ckpts/DreamBooth/RealisticVisionV60B1_v51VAE.safetensors
load domain lora from ./ckpts/Magic_Weights/magic_adapter_s/magic_adapter_s.ckpt
Traceback (most recent call last):
File "MagicTime/inference_magictime.py", line 249, in <module>
main(args)
File "miniforge3/envs/magictime/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "MagicTime/inference_magictime.py", line 76, in main
pipeline = load_weights(
File "MagicTime/utils/util.py", line 137, in load_weights
magic_adapter_s_state_dict = torch.load(magic_adapter_s_path, map_location="cpu")
File "miniforge3/envs/magictime/lib/python3.10/site-packages/torch/serialization.py", line 1040, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "miniforge3/envs/magictime/lib/python3.10/site-packages/torch/serialization.py", line 1258, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, 'v'.
Header to large error when running example. I suspect this is a problem with how I downloaded the models when running prep scripts. Will retry from scratch.
11:32 $ python inference_magictime.py --config sample_configs/RealisticVision.yaml
The results will be save to outputs/RealisticVision-3
Use MagicAdapter-S
Use MagicAdapter-T
Use Magic_Text_Encoder
Traceback (most recent call last):
File "myhome/dev/repos/MagicTime/inference_magictime.py", line 249, in <module>
main(args)
File "myhome/tools/miniforge3/envs/magictime/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/home/dkords/dev/repos/MagicTime/inference_magictime.py", line 61, in main
text_encoder = CLIPTextModel.from_pretrained(model_config.pretrained_model_path, subfolder="text_encoder").cuda()
File "myhome//tools/miniforge3/envs/magictime/lib/python3.10/site-packages/transformers/modeling_utils.py", line 3284, in from_pretrained
with safe_open(resolved_archive_file, framework="pt") as f:
safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooLarge
Any plans to release it?
视频长度只有2秒,好像还无法修改成更长的时间。
另外,基础模型是标准的SD1.5的整套框架,感觉质量有点差,是否考虑升级到SDXL或者更高的版本?
Hi,
When I run the command: conda env create -f environment.yml
I got the error below, how to solve it? Thank you.
(base) D:\AI\MagicTime>conda env create -f environment.yml
Collecting package metadata (repodata.json): done
Solving environment: failed
ResolvePackageNotFound:
Current set up defaults to GPU 0, and will run out of memory on a single GPU <= 8GB VRAM. Ideally there is some configuration to support specifying the GPU to use, or a number of GPUs to use.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.