Compare commits

...

7 Commits

Author SHA1 Message Date
Falko Victor Habel 112ad87f6a Merge pull request 'feat/model_fix' (#17) from feat/model_fix into develop
Gitea Actions For AIIA / Explore-Gitea-Actions (push) Successful in 26s Details
Reviewed-on: #17
2025-06-02 16:08:14 +00:00
Falko Victor Habel 9aa66cbe33 added missing requirment for pandas
Gitea Actions For AIIA / Explore-Gitea-Actions (push) Successful in 36s Details
2025-06-02 18:04:37 +02:00
Falko Victor Habel d37a0fab5e corrected manifest
Gitea Actions For AIIA / Explore-Gitea-Actions (push) Failing after 25s Details
2025-06-02 18:02:38 +02:00
Falko Victor Habel b4d5c35928 fixed aiia error in requirments
Gitea Actions For AIIA / Explore-Gitea-Actions (push) Has been cancelled Details
2025-06-02 18:02:20 +02:00
Falko Victor Habel 6df5fc2e72 corrected requirements
Gitea Actions For AIIA / Explore-Gitea-Actions (push) Failing after 15s Details
2025-06-02 17:58:38 +02:00
Falko Victor Habel 43260a977b updated version number
Gitea Actions For AIIA / Explore-Gitea-Actions (push) Failing after 21s Details
2025-06-02 17:55:41 +02:00
Falko Victor Habel a725dd4539 fixed model outputs to not run in an infinte loop 2025-06-02 17:54:40 +02:00
6 changed files with 17 additions and 6 deletions

View File

@ -1,4 +1,4 @@
include LICENSE
include README.md
include requirements.txt
recursive-include src/aiia *
recursive-include src/aiunn *

View File

@ -3,7 +3,7 @@ requires = ["setuptools>=45", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "aiunn"
version = "0.1.1"
version = "0.2.2"
description = "Finetuner for image upscaling using AIIA"
readme = "README.md"
requires-python = ">=3.10"

View File

@ -1,6 +1,6 @@
torch
aiia
pillow
pandas
torchvision
scikit-learn
git+https://gitea.fabelous.app/Machine-Learning/AIIA.git

View File

@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup(
name="aiunn",
version="0.2.1",
version="0.2.2",
packages=find_packages(where="src"),
package_dir={"": "src"},
install_requires=[

View File

@ -3,4 +3,4 @@ from .upsampler.aiunn import aiuNN
from .upsampler.config import aiuNNConfig
from .inference.inference import aiuNNInference
__version__ = "0.2.1"
__version__ = "0.2.2"

View File

@ -32,7 +32,18 @@ class aiuNN(PreTrainedModel):
def forward(self, x):
if self.base_model is None:
raise ValueError("Base model is not loaded. Call 'load_base_model' before forwarding.")
x = self.base_model(x) # Get base features
# Get base features - we need to extract the last hidden state if it's returned as part of a tuple/dict
base_output = self.base_model(x)
if isinstance(base_output, tuple):
x = base_output[0]
elif isinstance(base_output, dict):
x = base_output.get('last_hidden_state', base_output.get('hidden_states'))
if x is None:
raise ValueError("Expected 'last_hidden_state' or 'hidden_states' in model output")
else:
x = base_output
x = self.pixel_shuffle_conv(x) # Expand channels for shuffling
x = self.pixel_shuffle(x) # Rearrange channels into spatial dimensions
return x