azizinaghsh commited on
Commit
b48f0c7
·
1 Parent(s): f5aaf3c

parse character position

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -114,8 +114,11 @@ def generate(
114
  seq_feat = diffuser.net.model.clip_sequential
115
 
116
  batch = get_batch(prompt, sample_id, clip_model, dataset, seq_feat, device)
117
- batch["character_position"] = torch.tensor(character_position, device=device)
118
-
 
 
 
119
  with torch.no_grad():
120
  out = diffuser.predict_step(batch, 0)
121
 
 
114
  seq_feat = diffuser.net.model.clip_sequential
115
 
116
  batch = get_batch(prompt, sample_id, clip_model, dataset, seq_feat, device)
117
+ batch["character_position"] = torch.tensor(
118
+ [float(coord) for coord in character_position.strip("[]").split(",")],
119
+ device=device,
120
+ )
121
+
122
  with torch.no_grad():
123
  out = diffuser.predict_step(batch, 0)
124