Run this model with HF Jobs
Run kleerk/inference-pipeline 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/kleerk/inference-pipeline. 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/kleerk/inference-pipeline 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 kleerk/inference-pipeline with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use kleerk/inference-pipeline with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("kleerk/inference-pipeline", 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
Sebastian Semeniuc commited on
Commit ·
0b7f035
1
Parent(s): bec7879
remove unneccessary files
Browse filesFiles changed (8)
- README.md+9-32
- crysis.jpegDeleted
- huggingface.pngDeleted
- input_image_vermeer.pngDeleted
- result.pngDeleted
- result_crysis.pngDeleted
- result_huggingface.pngDeleted
- thumbnail.pngDeleted
1234567891011121314151617181920212223242526272829303132333435363738394041421 unmodified line4445464748495051525351 unmodified lines1051061071081091101112 unmodified lines114115116117---license: openrailtags:- stable-diffusion- stable-diffusion-diffusers- controlnet- endpoints-templatethumbnail: >-https://huggingface.co/philschmid/ControlNet-endpoint/resolve/main/thumbnail.pnginference: trueduplicated_from: philschmid/ControlNet-endpoint---# Inference Endpoint for [ControlNet](https://huggingface.co/lllyasviel/ControlNet) using [runwayml/stable-diffusion-v1-5](https://huggingface.co/runwayml/stable-diffusion-v1-5)> ControlNet is a neural network structure to control diffusion models by adding extra conditions.> Official repository: https://github.com/lllyasviel/ControlNet---Blog post: [Controlled text to image generation with Inference Endpoints]()This repository implements a custom `handler` task for `controlled text-to-image` generation on 🤗 Inference Endpoints. The code for the customized pipeline is in the [handler.py](https://huggingface.co/philschmid/ControlNet-endpoint/blob/main/handler.py).There is also a [notebook](https://huggingface.co/philschmid/ControlNet-endpoint/blob/main/create_handler.ipynb) included, on how to create the `handler.py`### expected Request payload```json{"inputs": "A prompt used for image generation","negative_prompt": "low res, bad anatomy, worst quality, low quality","controlnet_type": "depth","image" : "iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAAABGdBTUEAALGPC",}```1 unmodified linebelow is an example on how to run a request using Python and `requests`.## Use Python to send requests1. Get image```wget https://huggingface.co/datasets/diffusers/test-arrays/resolve/main/stable_diffusion_imgvar/input_image_vermeer.png```51 unmodified lines```expected output[Adding Conditional Control to Text-to-Image Diffusion Models](https://arxiv.org/abs/2302.05543) by Lvmin Zhang and Maneesh Agrawala.2 unmodified linesThe abstract of the paper is the following:We present a neural network structure, ControlNet, to control pretrained large diffusion models to support additional input conditions. The ControlNet learns task-specific conditions in an end-to-end way, and the learning is robust even when the training dataset is small (< 50k). Moreover, training a ControlNet is as fast as fine-tuning a diffusion model, and the model can be trained on a personal devices. Alternatively, if powerful computation clusters are available, the model can scale to large amounts (millions to billions) of data. We report that large diffusion models like Stable Diffusion can be augmented with ControlNets to enable conditional inputs like edge maps, segmentation maps, keypoints, etc. This may enrich the methods to control large diffusion models and further facilitate related applications.1234567891011121314151617181 unmodified line2021222324252627282951 unmodified lines818283848586872 unmodified lines9091929394# Inference Endpoint for [ControlNet](https://huggingface.co/lllyasviel/ControlNet) using [runwayml/stable-diffusion-v1-5](https://huggingface.co/runwayml/stable-diffusion-v1-5)> ControlNet is a neural network structure to control diffusion models by adding extra conditions.> Official repository: https://github.com/lllyasviel/ControlNet---### expected Request payload```json{"inputs": "A prompt used for image generation","negative_prompt": "low res, bad anatomy, worst quality, low quality","controlnet_type": "depth","image": "iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAAABGdBTUEAALGPC"}```1 unmodified linebelow is an example on how to run a request using Python and `requests`.## Use Python to send requests1. Get image```wget https://huggingface.co/datasets/diffusers/test-arrays/resolve/main/stable_diffusion_imgvar/input_image_vermeer.png```51 unmodified lines```expected output[Adding Conditional Control to Text-to-Image Diffusion Models](https://arxiv.org/abs/2302.05543) by Lvmin Zhang and Maneesh Agrawala.2 unmodified linesThe abstract of the paper is the following:We present a neural network structure, ControlNet, to control pretrained large diffusion models to support additional input conditions. The ControlNet learns task-specific conditions in an end-to-end way, and the learning is robust even when the training dataset is small (< 50k). Moreover, training a ControlNet is as fast as fine-tuning a diffusion model, and the model can be trained on a personal devices. Alternatively, if powerful computation clusters are available, the model can scale to large amounts (millions to billions) of data. We report that large diffusion models like Stable Diffusion can be augmented with ControlNets to enable conditional inputs like edge maps, segmentation maps, keypoints, etc. This may enrich the methods to control large diffusion models and further facilitate related applications.```
README.md+9-32
crysis.jpegDeleted
huggingface.pngDeleted
input_image_vermeer.pngDeleted
result.pngDeleted
result_crysis.pngDeleted
result_huggingface.pngDeleted
thumbnail.pngDeleted