Instructions to use Skywork/SkyReels-A2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Skywork/SkyReels-A2 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Skywork/SkyReels-A2", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Load it in to 16-bit quantization(float16 or bfloat16)
Hi,
Thanks for the support and sharing this repo, I want to load the models in the float16 or bfloat16, but still even though I have ram of 46GB still I am facing memory issues while loading the models itself.
Below are the things I tried it on AWS g6e.2xlarge(https://instances.vantage.sh/aws/ec2/g6e.2xlarge)
tried quantization with 16bit --> OOM error
tried with bfloat16 quantization --> mismatch error with prepare_latents method. float32 dtype
tried with bfloat16 quantization & update the dtype in prepare_latents method --> while generating getting the OOM error.
tried with CPU offload --> even then OOM eeror
when loaded with bfloat16 it occupied 44221Mib/46068Mib on NVIDIA L40S
Can you help me here, how to further proceed. or do I need to increase the computation power. Pls share the required details.
Thanks in advance,
Zeeshan