Run this model with HF Jobs
Run tensorart/SD3.5M-Controlnet-Canny 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/tensorart/SD3.5M-Controlnet-Canny. 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/tensorart/SD3.5M-Controlnet-Canny 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 tensorart/SD3.5M-Controlnet-Canny with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use tensorart/SD3.5M-Controlnet-Canny with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("tensorart/SD3.5M-Controlnet-Canny", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
xueyao commited on
Commit ·
4c882f2
1
Parent(s): 8c1bc0e
first commit
Browse filesFiles changed (3)
- README.mdAdded+78
- config.jsonAdded+33
- diffusion_pytorch_model.safetensorsAdded+3
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778---license: otherlicense_name: stabilityai-ai-communitylicense_link: LICENSE.mdlanguage:- enbase_model:- stabilityai/stable-diffusion-3.5-mediumpipeline_tag: text-to-image---
<div align="center">
**TensorArt Stable Diffusion 3.5 Medium ControlNet Canny**
<img src="./asset/demo.png"/></div>
# With SD3.5M```pythonimport torchfrom diffusers import StableDiffusion3ControlNetPipelinefrom diffusers import SD3ControlNetModelfrom diffusers.utils import load_image
controlnet = SD3ControlNetModel.from_pretrained("tensorart/SD3.5M-Controlnet-Canny")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-Canny/resolve/main/asset/canny.png")prompt = "An eye"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```pythonimport torchfrom diffusers import StableDiffusion3ControlNetPipelinefrom diffusers import SD3ControlNetModelfrom diffusers.utils import load_image
controlnet = SD3ControlNetModel.from_pretrained("tensorart/SD3.5M-Controlnet-Canny")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-Canny/resolve/main/asset/canny.png")prompt = "An eye"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: TensorArt123456789101112131415161718192021222324252627282930313233{ "_class_name": "SD3ControlNetModel", "_diffusers_version": "0.32.0.dev0", "_name_or_path": "stabilityai/stable-diffusion-3.5-medium", "attention_head_dim": 64, "caption_projection_dim": 1536, "dual_attention_layers": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ], "extra_conditioning_channels": 0, "in_channels": 16, "joint_attention_dim": 4096, "num_attention_heads": 24, "num_layers": 23, "out_channels": 16, "patch_size": 2, "pooled_projection_dim": 2048, "pos_embed_max_size": 384, "qk_norm": "rms_norm", "sample_size": 128}123version https://git-lfs.github.com/spec/v1oid sha256:60f6eeaf265ba3336705ecd6dcd8170985fa577bc5f04fd7649aca06f139634asize 4930003400README.mdAdded+78
config.jsonAdded+33
diffusion_pytorch_model.safetensorsAdded+3