File size: 2,498 Bytes
5ff0f12
 
 
 
 
 
 
deacddc
5ff0f12
 
 
 
 
15b9715
5ff0f12
 
 
 
 
 
 
 
 
 
 
 
 
deacddc
 
 
 
 
5ff0f12
 
 
 
 
 
 
 
 
 
 
 
15b9715
5ff0f12
 
 
 
 
 
15b9715
5ff0f12
7a367c3
5ff0f12
 
 
 
7a367c3
5ff0f12
7a367c3
5ff0f12
 
 
 
7a367c3
5ff0f12
 
 
 
 
 
 
deacddc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
license: other
license_name: stabilityai-ai-community
license_link: LICENSE.md
language:
- en
base_model:
- tensorart/bokeh_3.5_medium
pipeline_tag: text-to-image
---

<div align="center">

**Bokeh_Depth_Controlnet**

<img src="show.jpg"/>
</div>

## Description

- Input Image: Depth information map generated by depth estimation model
- Output Image: Base model integrates depth information for control, generating more realistic depth-of-field effects and spatial structure control.

The depth map enables the model to better understand spatial relationships within images, achieving more precise depth-of-field control and three-dimensional effect generation.

## Example
| input | output | Prompt |
|:---:|:---:|:---|
| <img src="./images/001_depth.png" width="300"/> | <img src="./images/001.png" width="300"/> | a old man |
| <img src="./images/002_depth.png" width="300"/> | <img src="./images/002.png" width="300"/> | A lone astronaut in a white suit and helmet, with a backpack, strolls on a rocky, red landscape under a star galaxy |
| <img src="./images/003_depth.png" width="300"/> | <img src="./images/003.png" width="300"/> | a eagle , black background |
| <img src="./images/004_depth.png" width="300"/> | <img src="./images/004.png" width="300"/> | A crystal heart sits on a gnarly, moss-covered log, with a galaxy background |

## Use 
We recommend using ComfyUI for local inference
![input](./comfy.png)

# With Bokeh
```python
import torch
from diffusers import StableDiffusion3ControlNetPipeline
from diffusers import SD3ControlNetModel
from diffusers.utils import load_image

controlnet = SD3ControlNetModel.from_pretrained("tensorart/Bokeh_Depth_Controlnet")
pipe = StableDiffusion3ControlNetPipeline.from_pretrained(
    "tensorart/bokeh_3.5_medium",
    controlnet=controlnet
)
pipe.to("cuda", torch.float16)

control_image = load_image("https://huggingface.co/tensorart/Bokeh_Depth_Controlnet/resolve/main/images/001_depth.png")
prompt = "A old man talking"
negative_prompt ="anime,render,cartoon,3d,bad hands,extra finger"
negative_prompt_3=""

image = pipe(
    prompt, 
    num_inference_steps=28,
    negative_prompt=negative_prompt, 
    negative_prompt_3=negative_prompt_3,
    control_image=control_image, 
    height=1440,
    width=1440,
    guidance_scale=4,
    controlnet_conditioning_scale=0.85
).images[0]
image.save('image.jpg')
```

## Contact
* Website: https://tensor.art  https://tusiart.com
* Developed by: TensorArt
* Api: https://tams.tensor.art/