Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
3c6ed71
1
Parent(s):
ff3110c
modified: src/flux/modules/conditioner.py
Browse files- src/flux/__pycache__/__init__.cpython-310.pyc +0 -0
- src/flux/__pycache__/_version.cpython-310.pyc +0 -0
- src/flux/__pycache__/math.cpython-310.pyc +0 -0
- src/flux/__pycache__/model.cpython-310.pyc +0 -0
- src/flux/__pycache__/sampling.cpython-310.pyc +0 -0
- src/flux/__pycache__/util.cpython-310.pyc +0 -0
- src/flux/modules/__pycache__/autoencoder.cpython-310.pyc +0 -0
- src/flux/modules/__pycache__/conditioner.cpython-310.pyc +0 -0
- src/flux/modules/__pycache__/layers.cpython-310.pyc +0 -0
- src/flux/modules/conditioner.py +2 -4
src/flux/__pycache__/__init__.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/__pycache__/__init__.cpython-310.pyc and b/src/flux/__pycache__/__init__.cpython-310.pyc differ
|
|
|
src/flux/__pycache__/_version.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/__pycache__/_version.cpython-310.pyc and b/src/flux/__pycache__/_version.cpython-310.pyc differ
|
|
|
src/flux/__pycache__/math.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/__pycache__/math.cpython-310.pyc and b/src/flux/__pycache__/math.cpython-310.pyc differ
|
|
|
src/flux/__pycache__/model.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/__pycache__/model.cpython-310.pyc and b/src/flux/__pycache__/model.cpython-310.pyc differ
|
|
|
src/flux/__pycache__/sampling.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/__pycache__/sampling.cpython-310.pyc and b/src/flux/__pycache__/sampling.cpython-310.pyc differ
|
|
|
src/flux/__pycache__/util.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/__pycache__/util.cpython-310.pyc and b/src/flux/__pycache__/util.cpython-310.pyc differ
|
|
|
src/flux/modules/__pycache__/autoencoder.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/modules/__pycache__/autoencoder.cpython-310.pyc and b/src/flux/modules/__pycache__/autoencoder.cpython-310.pyc differ
|
|
|
src/flux/modules/__pycache__/conditioner.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/modules/__pycache__/conditioner.cpython-310.pyc and b/src/flux/modules/__pycache__/conditioner.cpython-310.pyc differ
|
|
|
src/flux/modules/__pycache__/layers.cpython-310.pyc
CHANGED
|
Binary files a/src/flux/modules/__pycache__/layers.cpython-310.pyc and b/src/flux/modules/__pycache__/layers.cpython-310.pyc differ
|
|
|
src/flux/modules/conditioner.py
CHANGED
|
@@ -91,13 +91,11 @@ class HFEmbedder(nn.Module):
|
|
| 91 |
raise IndexError(f"Found negative input ID ({min_id}). This is invalid.")
|
| 92 |
|
| 93 |
# 确保输入在正确的设备上
|
| 94 |
-
input_ids = input_ids.to(self.device)
|
| 95 |
-
attention_mask = batch_encoding["attention_mask"].to(self.device)
|
| 96 |
|
| 97 |
print(f"Input IDs device: {input_ids.device}")
|
| 98 |
print(f"Attention Mask device: {attention_mask.device}")
|
| 99 |
-
print(f"Model device: {next(self.hf_module.parameters()).device}")
|
| 100 |
-
|
| 101 |
try:
|
| 102 |
outputs = self.hf_module(
|
| 103 |
input_ids=input_ids,
|
|
|
|
| 91 |
raise IndexError(f"Found negative input ID ({min_id}). This is invalid.")
|
| 92 |
|
| 93 |
# 确保输入在正确的设备上
|
| 94 |
+
input_ids = input_ids.to(self.hf_module.device)
|
| 95 |
+
attention_mask = batch_encoding["attention_mask"].to(self.hf_module.device)
|
| 96 |
|
| 97 |
print(f"Input IDs device: {input_ids.device}")
|
| 98 |
print(f"Attention Mask device: {attention_mask.device}")
|
|
|
|
|
|
|
| 99 |
try:
|
| 100 |
outputs = self.hf_module(
|
| 101 |
input_ids=input_ids,
|