[diffusion] Fix multi image input for GLM-Image (#26311)
Co-authored-by: ronnie_zheng <zl19940307@163.com>
This commit is contained in:
co-authored by
ronnie_zheng
parent
98bc6f3c22
commit
3afc80d781
@@ -65,8 +65,8 @@ class GlmImageLayerKVCache:
|
|||||||
self.k_cache = k
|
self.k_cache = k
|
||||||
self.v_cache = v
|
self.v_cache = v
|
||||||
else:
|
else:
|
||||||
self.k_cache = torch.cat([self.k_cache, k], dim=2)
|
self.k_cache = torch.cat([self.k_cache, k], dim=1)
|
||||||
self.v_cache = torch.cat([self.v_cache, v], dim=2)
|
self.v_cache = torch.cat([self.v_cache, v], dim=1)
|
||||||
|
|
||||||
def get(self):
|
def get(self):
|
||||||
return self.k_cache, self.v_cache
|
return self.k_cache, self.v_cache
|
||||||
|
|||||||
Reference in New Issue
Block a user