Spaces:
Running
on
Zero
Running
on
Zero
Alexander Bagus
commited on
Commit
·
5483c20
1
Parent(s):
8a599c9
22
Browse files
app.py
CHANGED
|
@@ -4,7 +4,8 @@ import os, random, json, spaces, torch, time, subprocess
|
|
| 4 |
|
| 5 |
import torch
|
| 6 |
# from transformers import AutoProcessor, AutoTokenizer
|
| 7 |
-
from diffusers import
|
|
|
|
| 8 |
|
| 9 |
from utils.image_utils import rescale_image
|
| 10 |
from utils.prompt_utils import polish_prompt
|
|
@@ -12,11 +13,11 @@ from utils.prompt_utils import polish_prompt
|
|
| 12 |
MODEL_REPO = "NewBie-AI/NewBie-image-Exp0.1"
|
| 13 |
MAX_SEED = np.iinfo(np.int32).max
|
| 14 |
|
| 15 |
-
pipe = NewbiePipeline.from_pretrained(
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
)
|
| 19 |
-
pipe.to("cuda")
|
| 20 |
|
| 21 |
# def prepare(prompt, is_polish_prompt):
|
| 22 |
# if not is_polish_prompt: return prompt, False
|
|
|
|
| 4 |
|
| 5 |
import torch
|
| 6 |
# from transformers import AutoProcessor, AutoTokenizer
|
| 7 |
+
from diffusers import DiffusionPipeline
|
| 8 |
+
# from diffusers import NewbiePipeline
|
| 9 |
|
| 10 |
from utils.image_utils import rescale_image
|
| 11 |
from utils.prompt_utils import polish_prompt
|
|
|
|
| 13 |
MODEL_REPO = "NewBie-AI/NewBie-image-Exp0.1"
|
| 14 |
MAX_SEED = np.iinfo(np.int32).max
|
| 15 |
|
| 16 |
+
# pipe = NewbiePipeline.from_pretrained(
|
| 17 |
+
# MODEL_REPO,
|
| 18 |
+
# torch_dtype=torch.bfloat16,
|
| 19 |
+
# )
|
| 20 |
+
# pipe.to("cuda")
|
| 21 |
|
| 22 |
# def prepare(prompt, is_polish_prompt):
|
| 23 |
# if not is_polish_prompt: return prompt, False
|