Instructions to use IamCreateAI/Ruyi-Mini-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use IamCreateAI/Ruyi-Mini-7B 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("IamCreateAI/Ruyi-Mini-7B", 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
Problem with running the model.
Hi, i am very new in ML and hugging face platform so i have some problems with running Ruyi-Mini-7B model. As it said in "Use this model" section i passed next code in google colab:
"
from diffusers import DiffusionPipeline
pipe = DiffusionPipeline.from_pretrained("IamCreateAI/Ruyi-Mini-7B")
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]
"
and the following error appeared: "module diffusers has no attribute RuyiInpaintPipeline".
Can you help me solve this problem?
Thanks in advance.
!pip install diffusers
from diffusers import StableDiffusionPipeline
Загрузка предобученной модели
pipe = StableDiffusionPipeline.from_pretrained("IamCreateAI/Ruyi-Mini-7B")
Установка промпта для генерации изображения
prompt = "Astronaut in a jungle, cold color palette, muted colors, detail, 8k"
Генерация изображения
image = pipe(prompt).images[0]
Сохранение изображения
image.save("generated_image.png")
Sorry that Ruyi has not been merged into diffusers. Please use the codes in github (https://github.com/IamCreateAI/Ruyi-Models) to generate videos.