File size: 2,278 Bytes
685d3ca
 
 
 
 
 
 
 
 
 
 
 
e91c6c6
685d3ca
 
812ec06
685d3ca
 
 
 
 
 
812ec06
685d3ca
 
 
 
d2856fb
685d3ca
 
 
 
812ec06
685d3ca
 
 
 
 
 
 
 
 
 
 
 
 
e91c6c6
685d3ca
 
 
 
812ec06
685d3ca
 
 
 
d12362b
685d3ca
 
 
 
812ec06
685d3ca
 
 
 
 
 
 
 
 
 
 
 
8d677da
 
 
 
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
75
76
77
78
79
---
license: other
license_name: stabilityai-ai-community
license_link: LICENSE.md
language:
- en
base_model:
- stabilityai/stable-diffusion-3.5-medium
pipeline_tag: text-to-image
---

<div align="center">

**TensorArt Stable Diffusion 3.5 Medium ControlNet Depth**

<img src="./asset/demo.png"/>
</div>

# With SD3.5M
```python
import torch
from diffusers import StableDiffusion3ControlNetPipeline
from diffusers import SD3ControlNetModel
from diffusers.utils import load_image

controlnet = SD3ControlNetModel.from_pretrained("tensorart/SD3.5M-Controlnet-Depth")
pipe = StableDiffusion3ControlNetPipeline.from_pretrained(
    "stabilityai/stable-diffusion-3.5-medium",
    controlnet=controlnet
)
pipe.to("cuda", torch.float16)

control_image = load_image("https://huggingface.co/tensorart/SD3.5M-Controlnet-Depth/resolve/main/asset/depth.png")
prompt = "A cyberpunk man"
negative_prompt = "low quality, worst quality, deformed, distorted, disfigured, motion smear, motion artifacts, fused fingers, bad anatomy, weird hand, ugly, monochrome"

image = pipe(
    prompt, 
    num_inference_steps=30,
    negative_prompt=negative_prompt, 
    control_image=control_image, 
    guidance_scale=4.5,
).images[0]
image.save('image.jpg')
```


# With TensorArt's SD3.5M Turbo
```python
import torch
from diffusers import StableDiffusion3ControlNetPipeline
from diffusers import SD3ControlNetModel
from diffusers.utils import load_image

controlnet = SD3ControlNetModel.from_pretrained("tensorart/SD3.5M-Controlnet-Depth")
pipe = StableDiffusion3ControlNetPipeline.from_pretrained(
    "tensorart/stable-diffusion-3.5-medium-turbo",
    controlnet=controlnet
)
pipe.to("cuda", torch.float16)

control_image = load_image("https://huggingface.co/tensorart/SD3.5M-Controlnet-Depth/resolve/main/asset/depth.png")
prompt = "A cyberpunk man"
negative_prompt = "low quality, worst quality, deformed, distorted, disfigured, motion smear, motion artifacts, fused fingers, bad anatomy, weird hand, ugly, monochrome"

image = pipe(
    prompt, 
    num_inference_steps=8,
    negative_prompt=negative_prompt, 
    control_image=control_image, 
    guidance_scale=1.5
).images[0]
image.save('image.jpg')
```

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