Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
videogen
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexlab
videogen
Commits
acfb9c78
Commit
acfb9c78
authored
Feb 28, 2026
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'experimental'
parents
dd47f79a
e7a0c182
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
videogen.py
videogen.py
+8
-0
No files found.
videogen.py
View file @
acfb9c78
...
@@ -10188,6 +10188,14 @@ def main(args):
...
@@ -10188,6 +10188,14 @@ def main(args):
if
frames
.
min
()
<
0
:
if
frames
.
min
()
<
0
:
# Convert from [-1, 1] to [0, 1]
# Convert from [-1, 1] to [0, 1]
frames
=
(
frames
+
1.0
)
/
2.0
frames
=
(
frames
+
1.0
)
/
2.0
# Check if colors appear inverted (mostly dark images mean inverted)
# Inverted images have mean > 0.5 when they should be < 0.5
mean_val
=
np
.
mean
(
frames
)
if
mean_val
>
0.7
:
# Likely inverted
print
(
f
" ⚠️ Detected inverted colors (mean={mean_val:.2f}), correcting..."
)
frames
=
1.0
-
frames
# Now convert from [0, 1] to [0, 255]
# Now convert from [0, 1] to [0, 255]
frames
=
np
.
clip
(
frames
,
0.0
,
1.0
)
*
255
frames
=
np
.
clip
(
frames
,
0.0
,
1.0
)
*
255
frames
=
frames
.
astype
(
np
.
uint8
)
frames
=
frames
.
astype
(
np
.
uint8
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment