Run this model with HF Jobs
Run airomix/sd 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/airomix/sd. 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/airomix/sd 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 airomix/sd with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use airomix/sd with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("airomix/sd", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download javascript/imageMaskFix.js from airomix/sd: direct link, hf CLI and curl.
- Browser
- Download file 1.35 kB
-
https://huggingface.co/airomix/sd/resolve/main/javascript/imageMaskFix.js
- Command line
-
hf download hf://airomix/sd/javascript/imageMaskFix.js
-
curl -L -o imageMaskFix.js https://huggingface.co/airomix/sd/resolve/main/javascript/imageMaskFix.js
1.35 kB
| /** | |
| * temporary fix for https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/668 | |
| * @see https://github.com/gradio-app/gradio/issues/1721 | |
| */ | |
| function imageMaskResize() { | |
| const canvases = gradioApp().querySelectorAll('#img2maskimg .touch-none canvas'); | |
| if (!canvases.length) { | |
| window.removeEventListener('resize', imageMaskResize); | |
| return; | |
| } | |
| const wrapper = canvases[0].closest('.touch-none'); | |
| const previewImage = wrapper.previousElementSibling; | |
| if (!previewImage.complete) { | |
| previewImage.addEventListener('load', imageMaskResize); | |
| return; | |
| } | |
| const w = previewImage.width; | |
| const h = previewImage.height; | |
| const nw = previewImage.naturalWidth; | |
| const nh = previewImage.naturalHeight; | |
| const portrait = nh > nw; | |
| const wW = Math.min(w, portrait ? h / nh * nw : w / nw * nw); | |
| const wH = Math.min(h, portrait ? h / nh * nh : w / nw * nh); | |
| wrapper.style.width = `${wW}px`; | |
| wrapper.style.height = `${wH}px`; | |
| wrapper.style.left = `0px`; | |
| wrapper.style.top = `0px`; | |
| canvases.forEach(c => { | |
| c.style.width = c.style.height = ''; | |
| c.style.maxWidth = '100%'; | |
| c.style.maxHeight = '100%'; | |
| c.style.objectFit = 'contain'; | |
| }); | |
| } | |
| onAfterUiUpdate(imageMaskResize); | |
| window.addEventListener('resize', imageMaskResize); | |