Instructions to use Hemanth-thunder/stable_diffusion_lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Hemanth-thunder/stable_diffusion_lora with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Hemanth-thunder/stable_diffusion_lora", dtype=torch.bfloat16, device_map="cuda") prompt = "hmat" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Download autotrain-advanced/docs/source/image_classification.mdx from Hemanth-thunder/stable_diffusion_lora: direct link, hf CLI and curl.
- Browser
- Download file 1.8 kB
-
https://huggingface.co/Hemanth-thunder/stable_diffusion_lora/resolve/main/autotrain-advanced/docs/source/image_classification.mdx
- Command line
-
hf download hf://Hemanth-thunder/stable_diffusion_lora/autotrain-advanced/docs/source/image_classification.mdx
-
curl -L -o image_classification.mdx https://huggingface.co/Hemanth-thunder/stable_diffusion_lora/resolve/main/autotrain-advanced/docs/source/image_classification.mdx
1.8 kB
| # Image Classification | |
| Image classification is a supervised learning problem: define a set of target classes (objects to identify in images), and train a model to recognize them using labeled example photos. | |
| Using AutoTrain, its super-easy to train a state-of-the-art image classification model. Just upload a set of images, and AutoTrain will automatically train a model to classify them. | |
| ## Data Preparation | |
| The data for image classification must be in zip format, with each class in a separate subfolder. For example, if you want to classify cats and dogs, your zip file should look like this: | |
| ``` | |
| cats_and_dogs.zip | |
| βββ cats | |
| β βββ cat.1.jpg | |
| β βββ cat.2.jpg | |
| β βββ cat.3.jpg | |
| β βββ ... | |
| βββ dogs | |
| βββ dog.1.jpg | |
| βββ dog.2.jpg | |
| βββ dog.3.jpg | |
| βββ ... | |
| ``` | |
| Some points to keep in mind: | |
| - The zip file should contain multiple folders (the classes), each folder should contain images of a single class. | |
| - The name of the folder should be the name of the class. | |
| - The images must be jpeg, jpg or png. | |
| - There should be at least 5 images per class. | |
| - There should not be any other files in the zip file. | |
| - There should not be any other folders inside the zip folder. | |
| When train.zip is decompressed, it creates two folders: cats and dogs. these are the two categories for classification. The images for both categories are in their respective folders. You can have as many categories as you want. | |
| ## Training | |
| Once you have your data ready, you can upload it to AutoTrain and select model and parameters. | |
| If the estimate looks good, click on `Create Project` button to start training. | |
|  |