Spaces:
Runtime error
Runtime error
erwold
commited on
Commit
·
4248210
1
Parent(s):
0f04459
Initial Commit
Browse files
app.py
CHANGED
@@ -114,7 +114,7 @@ class FluxInterface:
|
|
114 |
connector = Qwen2Connector().to(self.dtype).cpu()
|
115 |
connector_path = os.path.join(MODEL_CACHE_DIR, "qwen2-vl/connector.pt")
|
116 |
connector_state = torch.load(connector_path, map_location='cpu')
|
117 |
-
connector_state = {k: v.to(self.dtype) for k, v in connector_state.items()}
|
118 |
connector.load_state_dict(connector_state)
|
119 |
|
120 |
self.t5_context_embedder = nn.Linear(4096, 3072).to(self.dtype).cpu()
|
|
|
114 |
connector = Qwen2Connector().to(self.dtype).cpu()
|
115 |
connector_path = os.path.join(MODEL_CACHE_DIR, "qwen2-vl/connector.pt")
|
116 |
connector_state = torch.load(connector_path, map_location='cpu')
|
117 |
+
connector_state = {k.replace('module.', ''): v.to(self.dtype) for k, v in connector_state.items()}
|
118 |
connector.load_state_dict(connector_state)
|
119 |
|
120 |
self.t5_context_embedder = nn.Linear(4096, 3072).to(self.dtype).cpu()
|