Spaces:
Running
on
Zero
Running
on
Zero
Alexander Bagus
commited on
Commit
·
ba100e2
1
Parent(s):
2ec806f
22
Browse files
app.py
CHANGED
|
@@ -21,6 +21,14 @@ from utils.prompt_utils import polish_prompt
|
|
| 21 |
|
| 22 |
MAX_SEED = np.iinfo(np.int32).max
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
def prepare(prompt, is_polish_prompt):
|
| 25 |
if not is_polish_prompt: return prompt, False
|
| 26 |
polished_prompt = polish_prompt(prompt)
|
|
|
|
| 21 |
|
| 22 |
MAX_SEED = np.iinfo(np.int32).max
|
| 23 |
|
| 24 |
+
pipe = LongCatImagePipeline.from_pretrained(
|
| 25 |
+
"meituan-longcat/LongCat-Image",
|
| 26 |
+
torch_dtype=torch.bfloat16,
|
| 27 |
+
low_cpu_mem_usage=False,
|
| 28 |
+
)
|
| 29 |
+
pipe.to("cuda")
|
| 30 |
+
|
| 31 |
+
|
| 32 |
def prepare(prompt, is_polish_prompt):
|
| 33 |
if not is_polish_prompt: return prompt, False
|
| 34 |
polished_prompt = polish_prompt(prompt)
|