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
ModelZoo
ControlNet_pytorch
Commits
531c55b2
"vscode:/vscode.git/clone" did not exist on "abc47dece65f9e1db040549f6f02516ac4718dea"
Commit
531c55b2
authored
Nov 23, 2023
by
mashun1
Browse files
Update modules.py
parent
ca649a3f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
ldm/modules/encoders/modules.py
ldm/modules/encoders/modules.py
+1
-1
No files found.
ldm/modules/encoders/modules.py
View file @
531c55b2
...
@@ -147,7 +147,7 @@ class FrozenOpenCLIPEmbedder(AbstractEncoder):
...
@@ -147,7 +147,7 @@ class FrozenOpenCLIPEmbedder(AbstractEncoder):
assert
layer
in
self
.
LAYERS
assert
layer
in
self
.
LAYERS
# 修改读取路径
# 修改读取路径
model_path
=
Path
(
__file__
).
resolve
().
parent
.
parent
.
parent
/
"models"
/
"open_clip_pytorch_model.bin"
model_path
=
Path
(
__file__
).
resolve
().
parent
.
parent
.
parent
.
parent
/
"models"
/
"open_clip_pytorch_model.bin"
model
,
_
,
_
=
open_clip
.
create_model_and_transforms
(
arch
,
device
=
torch
.
device
(
'cpu'
),
pretrained
=
str
(
model_path
))
model
,
_
,
_
=
open_clip
.
create_model_and_transforms
(
arch
,
device
=
torch
.
device
(
'cpu'
),
pretrained
=
str
(
model_path
))
del
model
.
visual
del
model
.
visual
self
.
model
=
model
self
.
model
=
model
...
...
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