Run this model with HF Jobs
Run diffusers-internal-dev/sd35-controlnet-depth-8b on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/diffusers-internal-dev/sd35-controlnet-depth-8b. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/diffusers-internal-dev/sd35-controlnet-depth-8b on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use diffusers-internal-dev/sd35-controlnet-depth-8b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use diffusers-internal-dev/sd35-controlnet-depth-8b with Diffusers:
pip install -U diffusers transformers accelerate
from diffusers import ControlNetModel, StableDiffusionControlNetPipeline controlnet = ControlNetModel.from_pretrained("diffusers-internal-dev/sd35-controlnet-depth-8b") pipe = StableDiffusionControlNetPipeline.from_pretrained( "fill-in-base-model", controlnet=controlnet ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Update README.md
Browse files158 unmodified lines159160161162163164165166167168169170171172173174175176177158 unmodified lines#### Depth```python# install depthfm from https://github.com/CompVis/depth-fmimport torchvision.transforms as transformsfrom depthfm.dfm import DepthFMdepthfm_model = DepthFM(ckpt_path=checkpoint_path)depthfm_model.eval()# assuming img is a PIL imageimg = F.to_tensor(img)c, h, w = img.shapeimg = F.interpolate(img, (512, 512), mode='bilinear', align_corners=False)with torch.no_grad():img = self.depthfm_model(img, num_steps=2, ensemble_size=4)img = F.interpolate(img, (h, w), mode='bilinear', align_corners=False)```### Tips158 unmodified lines159160161162163164165166167168169170171158 unmodified lines#### Depth```python# install image_gen_aux with: pip install git+https://github.com/asomoza/image_gen_aux.gitfrom image_gen_aux import DepthPreprocessorimage = load_image("path to image")depth_preprocessor = DepthPreprocessor.from_pretrained("depth-anything/Depth-Anything-V2-Large-hf").to("cuda")depth_image = depth_preprocessor(image, invert=True)[0].convert("RGB")```### Tips
README.md+6-12