Instructions to use LiuZichen/MagicQuill-models with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use LiuZichen/MagicQuill-models 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("LiuZichen/MagicQuill-models", 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
Error running the magicquill demo
#10
by FrancisValero - opened
Error:
CUDA out of memory. Tried to allocate 146.00 MiB. GPU 0 has a total capacty of 21.95 GiB of which 56.12 MiB is free. Including non-PyTorch memory, this process has 0 bytes memory in use. Of the allocated memory 19.93 GiB is allocated by PyTorch, and 1.65 GiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
π