Spaces:
Running
on
Zero
Running
on
Zero
wondervictor
commited on
Update autoregressive/models/gpt_t2i.py
Browse files
autoregressive/models/gpt_t2i.py
CHANGED
@@ -434,9 +434,9 @@ class Transformer(nn.Module):
|
|
434 |
if condition is not None:
|
435 |
condition_embeddings = self.condition_mlp(condition,train=self.training)#.to(torch.bfloat16),train=self.training)
|
436 |
self.condition_token = condition_embeddings
|
437 |
-
self.condition_token = [self.
|
438 |
-
self.
|
439 |
-
self.
|
440 |
|
441 |
else: # decode_n_tokens(kv cache) in inference
|
442 |
token_embeddings = self.tok_embeddings(idx)
|
|
|
434 |
if condition is not None:
|
435 |
condition_embeddings = self.condition_mlp(condition,train=self.training)#.to(torch.bfloat16),train=self.training)
|
436 |
self.condition_token = condition_embeddings
|
437 |
+
self.condition_token = [self.condition_layers[0](self.condition_token),
|
438 |
+
self.condition_layers[1](self.condition_token),
|
439 |
+
self.condition_layers[2](self.condition_token)]
|
440 |
|
441 |
else: # decode_n_tokens(kv cache) in inference
|
442 |
token_embeddings = self.tok_embeddings(idx)
|