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
renzhc
diffusers_dcu
Commits
f8b54cf0
Unverified
Commit
f8b54cf0
authored
Feb 20, 2025
by
Aryan
Committed by
GitHub
Feb 19, 2025
Browse files
Remove print statements (#10836)
remove prints
parent
680a8ed8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
src/diffusers/models/modeling_utils.py
src/diffusers/models/modeling_utils.py
+1
-1
src/diffusers/pipelines/consisid/consisid_utils.py
src/diffusers/pipelines/consisid/consisid_utils.py
+4
-2
No files found.
src/diffusers/models/modeling_utils.py
View file @
f8b54cf0
...
@@ -1178,7 +1178,7 @@ class ModelMixin(torch.nn.Module, PushToHubMixin):
...
@@ -1178,7 +1178,7 @@ class ModelMixin(torch.nn.Module, PushToHubMixin):
hf_quantizer
.
preprocess_model
(
hf_quantizer
.
preprocess_model
(
model
=
model
,
device_map
=
device_map
,
keep_in_fp32_modules
=
keep_in_fp32_modules
model
=
model
,
device_map
=
device_map
,
keep_in_fp32_modules
=
keep_in_fp32_modules
)
)
print
(
keep_in_fp32_modules
)
# Now that the model is loaded, we can determine the device_map
# Now that the model is loaded, we can determine the device_map
device_map
=
_determine_device_map
(
device_map
=
_determine_device_map
(
model
,
device_map
,
max_memory
,
torch_dtype
,
keep_in_fp32_modules
,
hf_quantizer
model
,
device_map
,
max_memory
,
torch_dtype
,
keep_in_fp32_modules
,
hf_quantizer
...
...
src/diffusers/pipelines/consisid/consisid_utils.py
View file @
f8b54cf0
...
@@ -8,9 +8,11 @@ from PIL import Image, ImageOps
...
@@ -8,9 +8,11 @@ from PIL import Image, ImageOps
from
torchvision.transforms
import
InterpolationMode
from
torchvision.transforms
import
InterpolationMode
from
torchvision.transforms.functional
import
normalize
,
resize
from
torchvision.transforms.functional
import
normalize
,
resize
from
...utils
import
load_image
from
...utils
import
get_logger
,
load_image
logger
=
get_logger
(
__name__
)
_insightface_available
=
importlib
.
util
.
find_spec
(
"insightface"
)
is
not
None
_insightface_available
=
importlib
.
util
.
find_spec
(
"insightface"
)
is
not
None
_consisid_eva_clip_available
=
importlib
.
util
.
find_spec
(
"consisid_eva_clip"
)
is
not
None
_consisid_eva_clip_available
=
importlib
.
util
.
find_spec
(
"consisid_eva_clip"
)
is
not
None
_facexlib_available
=
importlib
.
util
.
find_spec
(
"facexlib"
)
is
not
None
_facexlib_available
=
importlib
.
util
.
find_spec
(
"facexlib"
)
is
not
None
...
@@ -166,7 +168,7 @@ def process_face_embeddings(
...
@@ -166,7 +168,7 @@ def process_face_embeddings(
# incase insightface didn't detect face
# incase insightface didn't detect face
if
id_ante_embedding
is
None
:
if
id_ante_embedding
is
None
:
pr
in
t
(
"
f
ail to detect face using insightface
, e
xtract embedding
on
align face"
)
logger
.
warn
in
g
(
"
F
ail
ed
to detect face using insightface
. E
xtract
ing
embedding
with
align face"
)
id_ante_embedding
=
face_helper_2
.
get_feat
(
align_face
)
id_ante_embedding
=
face_helper_2
.
get_feat
(
align_face
)
id_ante_embedding
=
torch
.
from_numpy
(
id_ante_embedding
).
to
(
device
,
weight_dtype
)
# torch.Size([512])
id_ante_embedding
=
torch
.
from_numpy
(
id_ante_embedding
).
to
(
device
,
weight_dtype
)
# torch.Size([512])
...
...
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