Spaces:
Sleeping
Sleeping
Commit
·
9e4dc36
1
Parent(s):
7a2026c
update
Browse files
app.py
CHANGED
@@ -322,9 +322,9 @@ def text_to_image(prompt,keywords,radio,slider_step,slider_guidance,slider_batch
|
|
322 |
prompt = tokenizer.encode(user_prompt)
|
323 |
composed_prompt = tokenizer.decode(prompt)
|
324 |
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
|
329 |
if radio == 'TextDiffuser-2':
|
330 |
|
|
|
322 |
prompt = tokenizer.encode(user_prompt)
|
323 |
composed_prompt = tokenizer.decode(prompt)
|
324 |
|
325 |
+
prompt = prompt[:77]
|
326 |
+
while len(prompt) < 77:
|
327 |
+
prompt.append(tokenizer.pad_token_id)
|
328 |
|
329 |
if radio == 'TextDiffuser-2':
|
330 |
|