Spaces:
Running
on
Zero
Running
on
Zero
guangkaixu
commited on
Commit
•
5f241ea
1
Parent(s):
3ef7e45
upload
Browse files
README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
emoji: ⚡
|
4 |
colorFrom: indigo
|
5 |
colorTo: red
|
|
|
1 |
---
|
2 |
+
title: GenPercept
|
3 |
emoji: ⚡
|
4 |
colorFrom: indigo
|
5 |
colorTo: red
|
app.py
CHANGED
@@ -27,8 +27,6 @@ import functools
|
|
27 |
import os
|
28 |
import tempfile
|
29 |
import warnings
|
30 |
-
import sys
|
31 |
-
sys.path.append("../")
|
32 |
|
33 |
import gradio as gr
|
34 |
import numpy as np
|
@@ -273,8 +271,8 @@ def main():
|
|
273 |
|
274 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
275 |
|
276 |
-
vae = AutoencoderKL.from_pretrained("
|
277 |
-
unet = UNet2DConditionModel.from_pretrained('
|
278 |
empty_text_embed = torch.from_numpy(np.load("./empty_text_embed.npy")).to(device, dtype)[None] # [1, 77, 1024]
|
279 |
|
280 |
pipe = GenPerceptPipeline(vae=vae,
|
|
|
27 |
import os
|
28 |
import tempfile
|
29 |
import warnings
|
|
|
|
|
30 |
|
31 |
import gradio as gr
|
32 |
import numpy as np
|
|
|
271 |
|
272 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
273 |
|
274 |
+
vae = AutoencoderKL.from_pretrained("guangkaixu/GenPercept", subfolder='vae')
|
275 |
+
unet = UNet2DConditionModel.from_pretrained('guangkaixu/GenPercept', subfolder="unet")
|
276 |
empty_text_embed = torch.from_numpy(np.load("./empty_text_embed.npy")).to(device, dtype)[None] # [1, 77, 1024]
|
277 |
|
278 |
pipe = GenPerceptPipeline(vae=vae,
|