Image-to-Video
Diffusers
WorldCrafterPipeline
worldcrafter
camera-control
autoregressive
context-memory
Instructions to use Drexubery/WorldCrafter-Context with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Drexubery/WorldCrafter-Context with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image, export_to_video # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Drexubery/WorldCrafter-Context", dtype=torch.bfloat16, device_map="cuda") pipe.to("cuda") prompt = "A man with short gray hair plays a red electric guitar." image = load_image( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/guitar-man.png" ) output = pipe(image=image, prompt=prompt).frames[0] export_to_video(output, "output.mp4") - Notebooks
- Google Colab
- Kaggle
Download inference_config.json from Drexubery/WorldCrafter-Context: direct link, hf CLI and curl.
- Browser
- Download file 1.62 kB
-
https://huggingface.co/Drexubery/WorldCrafter-Context/resolve/main/inference_config.json
- Command line
-
hf download hf://Drexubery/WorldCrafter-Context/inference_config.json
-
curl -L -o inference_config.json https://huggingface.co/Drexubery/WorldCrafter-Context/resolve/main/inference_config.json
1.62 kB
| { | |
| "format": "worldcrafter_context_v1", | |
| "components": { | |
| "transformer": { | |
| "repo_id": "TencentARC/WorldCrafter-Base", | |
| "revision": "d6b4731d4cec53f90b6afaee5a0f1b77d29979aa", | |
| "subfolder": "transformer" | |
| }, | |
| "text_encoder": { | |
| "repo_id": "TencentARC/WorldCrafter-Fast", | |
| "revision": "d2ac12a654f8cafde4cb2e0ae7d5127ce2624939", | |
| "subfolder": "text_encoder" | |
| }, | |
| "tokenizer": { | |
| "repo_id": "TencentARC/WorldCrafter-Fast", | |
| "revision": "d2ac12a654f8cafde4cb2e0ae7d5127ce2624939", | |
| "subfolder": "tokenizer" | |
| }, | |
| "vae": { | |
| "repo_id": "TencentARC/WorldCrafter-Fast", | |
| "revision": "d2ac12a654f8cafde4cb2e0ae7d5127ce2624939", | |
| "subfolder": "vae" | |
| }, | |
| "scheduler": { | |
| "repo_id": "TencentARC/WorldCrafter-Fast", | |
| "revision": "d2ac12a654f8cafde4cb2e0ae7d5127ce2624939", | |
| "subfolder": "scheduler" | |
| } | |
| }, | |
| "camera_adapter": { | |
| "path": "camera_adapter.bin", | |
| "format": "pytorch_state_dict", | |
| "dtype": "float32", | |
| "tensor_count": 400, | |
| "sha256": "54193515b30bd8e8474bacc745888fbb07dbeb4ca8ec0d364e470bec481e5f78", | |
| "camera_condition": "relray_absmap", | |
| "adaptation_method": "parallel", | |
| "attn_compress": 8 | |
| }, | |
| "context": { | |
| "memory_encoder": null, | |
| "memory_size": 4, | |
| "history_sizes": [ | |
| 2, | |
| 1 | |
| ], | |
| "keep_reference_frame": true, | |
| "num_latent_frames_per_chunk": 9 | |
| }, | |
| "training_resolution": { | |
| "height": 384, | |
| "width": 640 | |
| }, | |
| "lora": { | |
| "context_memory_lora_merged_in_transformer": true, | |
| "additional_lora": null | |
| }, | |
| "integration_required": true | |
| } | |