Using the
🤗's Diffusers library to run URSA in a simple and efficient manner.
1pip install diffusers transformers accelerate imageio[ffmpeg]
2pip install git+ssh://git@github.com/baaivision/URSA.git
1import torch
2from diffnext.pipelines import URSAPipeline
3
4model_id, height, width, guidance_scale = "Yovecents/URSA-1.7B-IBQ512-UDMGRPO-GenEval", 512, 512, 1.0
5model_args = {"torch_dtype": torch.float16, "trust_remote_code": True}
6pipe = URSAPipeline.from_pretrained(model_id, **model_args)
7pipe = pipe.to(torch.device("cuda"))
8
9prompt = "a photo of a pizza below a computer keyboard"
10
11image = pipe(**locals()).frames[0]
12image.save("ursa.jpg")
The model is intended for research purposes only. Possible research areas and tasks include
Excluded uses are described below.
The model was not trained to be factual or true representations of people or events, and therefore using the model to generate such content is out-of-scope for the abilities of this model.
Using the model to generate content that is cruel to individuals is a misuse of this model. This includes, but is not limited to:
While the capabilities of image generation models are impressive, they can also reinforce or exacerbate social biases.