Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
f822668
1
Parent(s):
8f1825b
modified: app.py
Browse files- app.py +1 -1
- src/flux/modules/conditioner.py +2 -2
app.py
CHANGED
|
@@ -64,7 +64,7 @@ class FluxEditor:
|
|
| 64 |
|
| 65 |
# init all components
|
| 66 |
self.clip = load_clip(self.device)
|
| 67 |
-
self.t5 = load_t5(self.device, max_length=256 if self.name == "flux-schnell" else
|
| 68 |
self.model = load_flow_model(self.name, self.device)
|
| 69 |
self.ae = load_ae(self.name, self.device)
|
| 70 |
self.t5.eval()
|
|
|
|
| 64 |
|
| 65 |
# init all components
|
| 66 |
self.clip = load_clip(self.device)
|
| 67 |
+
self.t5 = load_t5(self.device, max_length=256 if self.name == "flux-schnell" else 77)
|
| 68 |
self.model = load_flow_model(self.name, self.device)
|
| 69 |
self.ae = load_ae(self.name, self.device)
|
| 70 |
self.t5.eval()
|
src/flux/modules/conditioner.py
CHANGED
|
@@ -50,8 +50,8 @@ class HFEmbedder(nn.Module):
|
|
| 50 |
assert input_ids.shape[1] == self.max_length, f"Sequence length {input_ids.shape[1]} does not match max_length {self.max_length}"
|
| 51 |
print(input_ids)
|
| 52 |
|
| 53 |
-
print(f"self.tokenizer.vocab_size: {self.tokenizer.vocab_size}") # Debug
|
| 54 |
-
print(f"self.hf_module.config.vocab_size: {self.hf_module.config.vocab_size}") # Debug
|
| 55 |
|
| 56 |
outputs = self.hf_module(
|
| 57 |
input_ids=input_ids.to(self.hf_module.device),
|
|
|
|
| 50 |
assert input_ids.shape[1] == self.max_length, f"Sequence length {input_ids.shape[1]} does not match max_length {self.max_length}"
|
| 51 |
print(input_ids)
|
| 52 |
|
| 53 |
+
print(f"{flag: }self.tokenizer.vocab_size: {self.tokenizer.vocab_size}") # Debug
|
| 54 |
+
print(f"{flag: }self.hf_module.config.vocab_size: {self.hf_module.config.vocab_size}") # Debug
|
| 55 |
|
| 56 |
outputs = self.hf_module(
|
| 57 |
input_ids=input_ids.to(self.hf_module.device),
|