Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
kolors
Commits
c128695d
Commit
c128695d
authored
Aug 22, 2024
by
chenpangpang
Browse files
feat: 修改app.py避免下载模型;dockerfile bug修复
parent
626ddc66
Pipeline
#1586
failed with stages
in 0 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
Dockerfile
Dockerfile
+2
-1
Kolors/app.py
Kolors/app.py
+2
-2
No files found.
Dockerfile
View file @
c128695d
...
...
@@ -19,5 +19,6 @@ COPY chenyh/$IMAGE/Kwai-Kolors/Kolors /root/$IMAGE_UPPER/Kwai-Kolors/Kolors
COPY
chenyh/$IMAGE/Kwai-Kolors/Kolors-IP-Adapter-Plus /root/$IMAGE_UPPER/Kwai-Kolors/Kolors-IP-Adapter-Plus
COPY
--from=base /opt/conda/lib/python3.10/site-packages /opt/conda/lib/python3.10/site-packages
COPY
--from=base /root/$IMAGE/$IMAGE_UPPER /root/$IMAGE_UPPER
COPY
--from=base /root/$IMAGE/启动器.ipynb /root/$IMAGE/start.sh /root/$IMAGE/assets /root/
COPY
--from=base /root/$IMAGE/启动器.ipynb /root/$IMAGE/start.sh /root/
COPY
--from=base /root/$IMAGE/assets /root/assets
Kolors/app.py
View file @
c128695d
...
...
@@ -12,8 +12,8 @@ import gradio as gr
import
numpy
as
np
device
=
"cuda"
ckpt_dir
=
snapshot_download
(
repo_id
=
"Kwai-Kolors/Kolors"
)
ckpt_IPA_dir
=
snapshot_download
(
repo_id
=
"Kwai-Kolors/Kolors-IP-Adapter-Plus"
)
ckpt_dir
=
"Kwai-Kolors/Kolors"
ckpt_IPA_dir
=
"Kwai-Kolors/Kolors-IP-Adapter-Plus"
text_encoder
=
ChatGLMModel
.
from_pretrained
(
f
'
{
ckpt_dir
}
/text_encoder'
,
torch_dtype
=
torch
.
float16
).
half
().
to
(
device
)
tokenizer
=
ChatGLMTokenizer
.
from_pretrained
(
f
'
{
ckpt_dir
}
/text_encoder'
)
...
...
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