twodgirl commited on
Commit
b1fe126
1 Parent(s): e2aa741

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -7
README.md CHANGED
@@ -2,6 +2,8 @@
2
 
3
  The inference code provided for the text-to-image workflow. The modified code is not a requirement, it's for demo purposes only. It has less heavy requirements than the [original repo](https://github.com/lehduong/OneDiffusion/tree/b6024589cc56b5af36268761828878b25af5e2fb). The inference speed is 7 s/it atm with the flash attention module removed.
4
 
 
 
5
  If you need a prompt to describe other images, you can use the [Molmo spaces](https://huggingface.co/spaces?search=molmo).
6
 
7
  ## Installation
@@ -19,13 +21,14 @@ import torch
19
  if __name__ == '__main__':
20
  prompt = 'A bipedal black cat wearing a huge oversized witch hat, a wizards robe, casting a spell,in an enchanted forest. The scene is filled with fireflies and moss on surrounding rocks and trees'
21
  negative_prompt = 'monochrome, greyscale, low-res, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, artist name, poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation'
22
- pipeline = OneDiffusionPipeline.from_pretrained("twodgirl/onediffusion-bf16").to(device='cuda',
23
  dtype=torch.bfloat16)
24
- image = pipeline(prompt='[[text2image]] {}'.format(prompt),
25
- negative_prompt=negative_prompt,
26
- num_inference_steps=30,
27
- guidance_scale=4,
28
- height=1024,
29
- width=1024).images[0]
 
30
  image.save('cat.png')
31
  ```
 
2
 
3
  The inference code provided for the text-to-image workflow. The modified code is not a requirement, it's for demo purposes only. It has less heavy requirements than the [original repo](https://github.com/lehduong/OneDiffusion/tree/b6024589cc56b5af36268761828878b25af5e2fb). The inference speed is 7 s/it atm with the flash attention module removed.
4
 
5
+ The VRAM requirement is similar to that of SDXL and SD3.5 Medium models.
6
+
7
  If you need a prompt to describe other images, you can use the [Molmo spaces](https://huggingface.co/spaces?search=molmo).
8
 
9
  ## Installation
 
21
  if __name__ == '__main__':
22
  prompt = 'A bipedal black cat wearing a huge oversized witch hat, a wizards robe, casting a spell,in an enchanted forest. The scene is filled with fireflies and moss on surrounding rocks and trees'
23
  negative_prompt = 'monochrome, greyscale, low-res, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, artist name, poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation'
24
+ pipe = OneDiffusionPipeline.from_pretrained('twodgirl/onediffusion-bf16').to(device='cuda',
25
  dtype=torch.bfloat16)
26
+ # pipe.enable_model_cpu_offload()
27
+ image = pipe(prompt='[[text2image]] {}'.format(prompt),
28
+ negative_prompt=negative_prompt,
29
+ num_inference_steps=30,
30
+ guidance_scale=4,
31
+ height=1024,
32
+ width=1024).images[0]
33
  image.save('cat.png')
34
  ```