Transformers

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.
sd / test /test_utils.py
airomix's picture
Upload 511 files
8e68b99
Raw History Blame Contribute Delete
934 Bytes
import pytest
import requests
def test_options_write(base_url):
url_options = f"{base_url}/sdapi/v1/options"
response = requests.get(url_options)
assert response.status_code == 200
pre_value = response.json()["send_seed"]
assert requests.post(url_options, json={'send_seed': (not pre_value)}).status_code == 200
response = requests.get(url_options)
assert response.status_code == 200
assert response.json()['send_seed'] == (not pre_value)
requests.post(url_options, json={"send_seed": pre_value})
@pytest.mark.parametrize("url", [
"sdapi/v1/cmd-flags",
"sdapi/v1/samplers",
"sdapi/v1/upscalers",
"sdapi/v1/sd-models",
"sdapi/v1/hypernetworks",
"sdapi/v1/face-restorers",
"sdapi/v1/realesrgan-models",
"sdapi/v1/prompt-styles",
"sdapi/v1/embeddings",
])
def test_get_api_url(base_url, url):
assert requests.get(f"{base_url}/{url}").status_code == 200