clementchadebec
commited on
Commit
•
bae47cf
1
Parent(s):
ba672b0
Update README.md
Browse files
README.md
CHANGED
@@ -62,6 +62,24 @@ image
|
|
62 |
|
63 |
💡 Note: You can compute the conditioning map using the `NormalBaeDetector` from the `controlnet_aux` library
|
64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
# Training
|
66 |
This model was trained with depth maps computed with [Clipdrop's surface normals estimator model](https://clipdrop.co/apis/docs/portrait-surface-normals) as well as an open-souce surface normals estimation model such as Boundary Aware Encoder (BAE).
|
67 |
|
|
|
62 |
|
63 |
💡 Note: You can compute the conditioning map using the `NormalBaeDetector` from the `controlnet_aux` library
|
64 |
|
65 |
+
```python
|
66 |
+
from controlnet_aux import NormalBaeDetector
|
67 |
+
from diffusers.utils import load_image
|
68 |
+
|
69 |
+
normal_bae = NormalBaeDetector.from_pretrained("lllyasviel/Annotators")
|
70 |
+
|
71 |
+
# Load an image
|
72 |
+
im = load_image(
|
73 |
+
"https://huggingface.co/jasperai/Flux.1-dev-Controlnet-Surface-Normals/resolve/main/examples/output.jpg"
|
74 |
+
)
|
75 |
+
|
76 |
+
surface = normal_bae(
|
77 |
+
im
|
78 |
+
)
|
79 |
+
surface
|
80 |
+
```
|
81 |
+
|
82 |
+
|
83 |
# Training
|
84 |
This model was trained with depth maps computed with [Clipdrop's surface normals estimator model](https://clipdrop.co/apis/docs/portrait-surface-normals) as well as an open-souce surface normals estimation model such as Boundary Aware Encoder (BAE).
|
85 |
|