update the readme
Browse files
README.md
CHANGED
@@ -120,6 +120,17 @@ image = pipe(
|
|
120 |
image.save('depth-8b.jpg')
|
121 |
```
|
122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
### Preprocessing
|
124 |
|
125 |
An input image can be preprocessed for control use following the code snippet below. SD3.5 does not implement this behavior, so we recommend doing so in an external script beforehand.
|
|
|
120 |
image.save('depth-8b.jpg')
|
121 |
```
|
122 |
|
123 |
+
You can use `image_gen_aux` to extract `depth_image`, which contains all the preprocessor required to use with diffusers pipelines.
|
124 |
+
|
125 |
+
```python
|
126 |
+
# install image_gen_aux with: pip install git+https://github.com/asomoza/image_gen_aux.git
|
127 |
+
from image_gen_aux import DepthPreprocessor
|
128 |
+
image = load_image("path to image")
|
129 |
+
|
130 |
+
depth_preprocessor = DepthPreprocessor.from_pretrained("depth-anything/Depth-Anything-V2-Large-hf").to("cuda")
|
131 |
+
depth_image = depth_preprocessor(image, invert=True)[0].convert("RGB")
|
132 |
+
```
|
133 |
+
|
134 |
### Preprocessing
|
135 |
|
136 |
An input image can be preprocessed for control use following the code snippet below. SD3.5 does not implement this behavior, so we recommend doing so in an external script beforehand.
|