Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
coderai
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
coderai
Commits
c4af709f
Commit
c4af709f
authored
Mar 15, 2026
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix image model preloading - only preload when --loadall or --loadswap is set
parent
d24c7e18
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
coderai
coderai
+8
-5
No files found.
coderai
View file @
c4af709f
...
@@ -5306,7 +5306,8 @@ def main():
...
@@ -5306,7 +5306,8 @@ def main():
# Load image model (first one only in loadall mode currently)
# Load image model (first one only in loadall mode currently)
print(f"
DEBUG
:
image_models
check
at
line
4718
:
{
image_models
},
backend
=
{
args
.
backend
}
")
print(f"
DEBUG
:
image_models
check
at
line
4718
:
{
image_models
},
backend
=
{
args
.
backend
}
")
if image_models and not getattr(args, 'nopreload', False):
# Only preload image model if loadall or loadswap mode is set
if image_models and not getattr(args, 'nopreload', False) and load_mode in ("
loadall
", "
loadswap
"):
print(f"
Pre
-
loading
image
model
:
{
image_models
[
0
]}
")
print(f"
Pre
-
loading
image
model
:
{
image_models
[
0
]}
")
# Get the original model name
# Get the original model name
...
@@ -5589,7 +5590,8 @@ def main():
...
@@ -5589,7 +5590,8 @@ def main():
#
Vulkan
:
Load
all
models
to
GPU
like
loadall
#
Vulkan
:
Load
all
models
to
GPU
like
loadall
if
model_names
:
if
model_names
:
print
(
f
"Pre-loading main text model: {model_names[0]}"
)
print
(
f
"Pre-loading main text model: {model_names[0]}"
)
if
image_models
and
not
getattr
(
args
,
'nopreload'
,
False
):
#
Only
preload
image
model
if
loadall
or
loadswap
mode
is
set
if
image_models
and
not
getattr
(
args
,
'nopreload'
,
False
)
and
load_mode
in
(
"loadall"
,
"loadswap"
):
print
(
f
"Pre-loading image model: {image_models[0]}"
)
print
(
f
"Pre-loading image model: {image_models[0]}"
)
if
audio_models
:
if
audio_models
:
print
(
f
"Pre-loading audio model: {audio_models[0]}"
)
print
(
f
"Pre-loading audio model: {audio_models[0]}"
)
...
@@ -5599,7 +5601,8 @@ def main():
...
@@ -5599,7 +5601,8 @@ def main():
#
NVIDIA
/
CUDA
:
First
model
in
VRAM
,
others
in
RAM
#
NVIDIA
/
CUDA
:
First
model
in
VRAM
,
others
in
RAM
if
model_names
:
if
model_names
:
print
(
f
"Main text model will be in VRAM: {model_names[0]}"
)
print
(
f
"Main text model will be in VRAM: {model_names[0]}"
)
if
image_models
and
not
getattr
(
args
,
'nopreload'
,
False
):
#
Only
preload
image
model
if
loadall
or
loadswap
mode
is
set
if
image_models
and
not
getattr
(
args
,
'nopreload'
,
False
)
and
load_mode
in
(
"loadall"
,
"loadswap"
):
print
(
f
"Image model in RAM: {image_models[0]}"
)
print
(
f
"Image model in RAM: {image_models[0]}"
)
if
audio_models
:
if
audio_models
:
print
(
f
"Audio model in RAM: {audio_models[0]}"
)
print
(
f
"Audio model in RAM: {audio_models[0]}"
)
...
@@ -5859,8 +5862,8 @@ def main():
...
@@ -5859,8 +5862,8 @@ def main():
'
offload
': args.image_offload,
'
offload
': args.image_offload,
})
})
# Pre-load image model if
it'
s
configured
(
even
with
audio
models
)
# Pre-load image model if
configured and in loadall/loadswap mode
if
image_models
and
not
getattr
(
args
,
'nopreload'
,
False
):
if image_models and not getattr(args, '
nopreload
', False)
and load_mode in ("loadall", "loadswap")
:
print(f"Pre-loading image model...")
print(f"Pre-loading image model...")
# Get the original model name
# Get the original model name
...
...
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