使用 🤗's Diffusers 库 可简单高效地运行 URSA。
pip install diffusers transformers accelerate imageio[ffmpeg]
pip install git+ssh://git@github.com/baaivision/URSA.git运行流水线:
import torch
from diffnext.pipelines import URSAPipeline
model_id, height, width = "BAAI/URSA-1.7B-IBQ512", 512, 512
model_args = {"torch_dtype": torch.float16, "trust_remote_code": True}
pipe = URSAPipeline.from_pretrained(model_id, **model_args)
pipe = pipe.to(torch.device("cuda"))
prompt = "The bear, calm and still, gazes upward as if lost in contemplation of the cosmos."
negative_prompt = "worst quality, low quality, inconsistent motion, static, still, blurry, jittery, distorted, ugly"
image = pipe(**locals()).frames[0]
image.save("ursa.jpg")本模型仅供研究使用。可能的研究领域和任务包括:
以下为排除用途。
本模型并非为生成关于人物或事件的事实性或真实性内容而训练,因此使用本模型生成此类内容超出了本模型的能力范围。
使用本模型生成对个人残忍的内容属于对本模型的误用。这包括但不限于:
尽管图像生成模型的能力令人印象深刻,但它们也可能强化或加剧社会偏见。