Instructions to use jasperai/Flux.1-dev-Controlnet-Depth with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use jasperai/Flux.1-dev-Controlnet-Depth with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("jasperai/Flux.1-dev-Controlnet-Depth", torch_dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -50,8 +50,8 @@ image = pipe(
|
|
| 50 |
controlnet_conditioning_scale=0.6,
|
| 51 |
num_inference_steps=28,
|
| 52 |
guidance_scale=3.5,
|
| 53 |
-
height=
|
| 54 |
-
width=
|
| 55 |
).images[0]
|
| 56 |
image
|
| 57 |
```
|
|
|
|
| 50 |
controlnet_conditioning_scale=0.6,
|
| 51 |
num_inference_steps=28,
|
| 52 |
guidance_scale=3.5,
|
| 53 |
+
height=control_image.size[1],
|
| 54 |
+
width=control_image.size[0]
|
| 55 |
).images[0]
|
| 56 |
image
|
| 57 |
```
|