Instructions to use Pensioner/LightShift with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Pensioner/LightShift with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Pensioner/LightShift", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
| { | |
| "_class_name": "UNetSpatioTemporalConditionModel", | |
| "_diffusers_version": "0.30.2", | |
| "_name_or_path": "/home/sguo/myfile/IID/SVD/stable-video-diffusion-img2vid-xt", | |
| "addition_time_embed_dim": 256, | |
| "block_out_channels": [ | |
| 320, | |
| 640, | |
| 1280, | |
| 1280 | |
| ], | |
| "cross_attention_dim": 1024, | |
| "down_block_types": [ | |
| "CrossAttnDownBlockSpatioTemporal", | |
| "CrossAttnDownBlockSpatioTemporal", | |
| "CrossAttnDownBlockSpatioTemporal", | |
| "DownBlockSpatioTemporal" | |
| ], | |
| "in_channels": 8, | |
| "layers_per_block": 2, | |
| "num_attention_heads": [ | |
| 5, | |
| 10, | |
| 20, | |
| 20 | |
| ], | |
| "num_frames": 25, | |
| "out_channels": 4, | |
| "projection_class_embeddings_input_dim": 768, | |
| "sample_size": 96, | |
| "transformer_layers_per_block": 1, | |
| "up_block_types": [ | |
| "UpBlockSpatioTemporal", | |
| "CrossAttnUpBlockSpatioTemporal", | |
| "CrossAttnUpBlockSpatioTemporal", | |
| "CrossAttnUpBlockSpatioTemporal" | |
| ] | |
| } | |