system requirements
Hi! What are the system requirements for this model? I'm trying to run on RTX4070Ti, but I get the following message:
torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 26.00 MiB. GPU 0 has a total capacity of 11.99 GiB of which 0 bytes is free. Of the allocated memory 9.69 GiB is allocated by PyTorch, and 142.72 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)
The code:
import torch
from diffusers import Kandinsky5I2IPipeline
from diffusers.utils import load_image
model_id = "kandinskylab/Kandinsky-5.0-I2I-Lite-sft-Diffusers"
pipe = Kandinsky5I2IPipeline.from_pretrained(model_id)
pipe.to(device='cuda', dtype=torch.bfloat16) # Используйте bfloat16 или float16
pipe.enable_model_cpu_offload() # Обязательно для моделей >10B параметров
init_image = load_image("https://huggingface.co/kandinsky-community/kandinsky-3/resolve/main/assets/title.jpg"
"?download=true")
prompt = "Изменить фон на тропический пляж с пальмами"
3. Генерация
image = pipe(
image=init_image,
prompt=prompt,
guidance_scale=3.5,
num_inference_steps=50
).image[0]
Can it be used on this graphics card?