updated readme to feature tf support
Gitea Actions For AIIA / Explore-Gitea-Actions (push) Successful in 39s Details

This commit is contained in:
Falko Victor Habel 2025-04-20 22:36:43 +02:00
parent 38530d5d44
commit f3e59a6586
1 changed files with 15 additions and 8 deletions

View File

@ -26,15 +26,22 @@ pip install git+https://gitea.fabelous.app/Machine-Learning/aiuNN.git
Here's a basic example of how to use `aiuNN` for image upscaling: Here's a basic example of how to use `aiuNN` for image upscaling:
```python src/main.py ```python src/main.py
from aiia import AIIABase from aiia import AIIABase, AIIAConfig
from aiunn import aiuNN, aiuNNTrainer from aiunn import aiuNN, aiuNNTrainer
import pandas as pd import pandas as pd
from torchvision import transforms from torchvision import transforms
# Create a configuration and build a base model.
config = AIIAConfig()
ai_config = aiuNNConfig()
base_model = AIIABase(config)
upscaler = aiuNN(config=ai_config)
# Load your base model and upscaler # Load your base model and upscaler
pretrained_model_path = "path/to/aiia/model" pretrained_model_path = "path/to/aiia/model"
base_model = AIIABase.load(pretrained_model_path, precision="bf16") base_model = AIIABase.from_pretrained(pretrained_model_path)
upscaler = aiuNN(base_model) upscaler.load_base_model(base_model)
# Create trainer with your dataset class # Create trainer with your dataset class
trainer = aiuNNTrainer(upscaler, dataset_class=UpscaleDataset) trainer = aiuNNTrainer(upscaler, dataset_class=UpscaleDataset)