Fine-tune Stable Diffusion with feedback-driven Optuna hyperparameter search
Project description
overview
# Feedback Image Trainer
A Python package to fine-tune Stable Diffusion models using feedback-driven hyperparameter search with Optuna.
## Installation
```bash
pip install feedback_image_trainer
Usage
from feedback_image_trainer import run_study
run_study(
feedback_file="image_feedback.json",
model_path="runwayml/stable-diffusion-v1-5",
output_dir="fine_tuned_model",
trials=5
)
Input Data Format
The image_feedback.json file should contain a list of dictionaries with the following structure:
[
{
"image_path": "path/to/image.png",
"prompt": "A description of the image",
"feedback": 1
},
...
]
Requirements
- Python 3.8+
- torch>=2.0.0
- diffusers>=0.20.0
- transformers>=4.30.0
- accelerate>=0.20.0
- optuna>=2.0.0
- torchvision>=0.15.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file feedback_image_trainer-0.1.0.tar.gz.
File metadata
- Download URL: feedback_image_trainer-0.1.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b56c4cd7b4c761799745ee01863b3e2c885dbba0adb20a459dcd613fc5f5bf90
|
|
| MD5 |
a4732fa1a98cc5b4f6673c606fd17f9f
|
|
| BLAKE2b-256 |
a3b3b81655ab8369dc279534f0a22972d45b3cc36d152503d8445428412be077
|
File details
Details for the file feedback_image_trainer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: feedback_image_trainer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
558d6e682fc9e287d572b887fa32990c23272fc0a5df13d651390558e9eae21c
|
|
| MD5 |
ea20bf378a51e1aea766f2a90391cf37
|
|
| BLAKE2b-256 |
cf9ef3281d3b4e0f7286622d90a660dbfb8163eae8a1a7c9002cb25060037915
|