Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,10 @@ accelerator = Accelerator(cpu=True)
|
|
13 |
pipe = accelerator.prepare(AmusedPipeline.from_pretrained("amused/amused-512", variant=None, torch_dtype=torch.float32, use_safetensors=True))
|
14 |
pipe.vqvae.to(torch.float32)
|
15 |
pipe = pipe.to("cpu")
|
|
|
16 |
def plex(prompt):
|
|
|
|
|
17 |
prompt = prompt
|
18 |
generator = torch.Generator(device="cpu").manual_seed(random.randint(1, 4836923))
|
19 |
image = pipe(prompt, generator=generator)
|
|
|
13 |
pipe = accelerator.prepare(AmusedPipeline.from_pretrained("amused/amused-512", variant=None, torch_dtype=torch.float32, use_safetensors=True))
|
14 |
pipe.vqvae.to(torch.float32)
|
15 |
pipe = pipe.to("cpu")
|
16 |
+
apol=[]
|
17 |
def plex(prompt):
|
18 |
+
gc.collect()
|
19 |
+
apol=[]
|
20 |
prompt = prompt
|
21 |
generator = torch.Generator(device="cpu").manual_seed(random.randint(1, 4836923))
|
22 |
image = pipe(prompt, generator=generator)
|