Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -39,9 +39,6 @@ def get_lora_sd_pipeline(
|
|
39 |
return pipe
|
40 |
|
41 |
def split_prompt(prompt, tokenizer, max_length=77):
|
42 |
-
print(prompt)
|
43 |
-
print(type(prompt))
|
44 |
-
print(prompt.value)
|
45 |
tokens = tokenizer(prompt, truncation=False)["input_ids"]
|
46 |
chunks = [tokens[i:i + max_length] for i in range(0, len(tokens), max_length)]
|
47 |
return chunks
|
|
|
39 |
return pipe
|
40 |
|
41 |
def split_prompt(prompt, tokenizer, max_length=77):
|
|
|
|
|
|
|
42 |
tokens = tokenizer(prompt, truncation=False)["input_ids"]
|
43 |
chunks = [tokens[i:i + max_length] for i in range(0, len(tokens), max_length)]
|
44 |
return chunks
|