Update README.md
Browse files
README.md
CHANGED
@@ -54,7 +54,7 @@ You can use the model both with the [🧨Diffusers library](https://github.com/h
|
|
54 |
from diffusers import VersatileDiffusionTextToImagePipeline
|
55 |
import torch
|
56 |
|
57 |
-
pipe = VersatileDiffusionTextToImagePipeline.from_pretrained("
|
58 |
pipe.remove_unused_weights()
|
59 |
pipe = pipe.to("cuda")
|
60 |
|
@@ -75,7 +75,7 @@ url = "https://huggingface.co/datasets/diffusers/images/resolve/main/benz.jpg"
|
|
75 |
response = requests.get(url)
|
76 |
image = Image.open(BytesIO(response.content)).convert("RGB")
|
77 |
|
78 |
-
pipe = VersatileDiffusionImageVariationPipeline.from_pretrained("
|
79 |
pipe = pipe.to("cuda")
|
80 |
|
81 |
generator = torch.Generator(device="cuda").manual_seed(0)
|
@@ -84,7 +84,7 @@ image.save("./car_variation.png")
|
|
84 |
```
|
85 |
#### Dual-guided generation
|
86 |
```py
|
87 |
-
from diffusers import
|
88 |
import torch
|
89 |
import requests
|
90 |
from io import BytesIO
|
@@ -97,7 +97,7 @@ response = requests.get(url)
|
|
97 |
image = Image.open(BytesIO(response.content)).convert("RGB")
|
98 |
text = "a red car in the sun"
|
99 |
|
100 |
-
pipe =
|
101 |
pipe.remove_unused_weights()
|
102 |
pipe = pipe.to("cuda")
|
103 |
|
|
|
54 |
from diffusers import VersatileDiffusionTextToImagePipeline
|
55 |
import torch
|
56 |
|
57 |
+
pipe = VersatileDiffusionTextToImagePipeline.from_pretrained("shi-labs/versatile-diffusion", torch_dtype=torch.float16)
|
58 |
pipe.remove_unused_weights()
|
59 |
pipe = pipe.to("cuda")
|
60 |
|
|
|
75 |
response = requests.get(url)
|
76 |
image = Image.open(BytesIO(response.content)).convert("RGB")
|
77 |
|
78 |
+
pipe = VersatileDiffusionImageVariationPipeline.from_pretrained("shi-labs/versatile-diffusion", torch_dtype=torch.float16)
|
79 |
pipe = pipe.to("cuda")
|
80 |
|
81 |
generator = torch.Generator(device="cuda").manual_seed(0)
|
|
|
84 |
```
|
85 |
#### Dual-guided generation
|
86 |
```py
|
87 |
+
from diffusers import VersatileDiffusionDualGuidedPipeline
|
88 |
import torch
|
89 |
import requests
|
90 |
from io import BytesIO
|
|
|
97 |
image = Image.open(BytesIO(response.content)).convert("RGB")
|
98 |
text = "a red car in the sun"
|
99 |
|
100 |
+
pipe = VersatileDiffusionDualGuidedPipeline.from_pretrained("shi-labs/versatile-diffusion", torch_dtype=torch.float16)
|
101 |
pipe.remove_unused_weights()
|
102 |
pipe = pipe.to("cuda")
|
103 |
|