Spaces:
Paused
Paused
Update edit_app.py
Browse files- edit_app.py +4 -1
edit_app.py
CHANGED
@@ -15,6 +15,7 @@ from einops import rearrange
|
|
15 |
from omegaconf import OmegaConf
|
16 |
from PIL import Image, ImageOps
|
17 |
from torch import autocast
|
|
|
18 |
|
19 |
sys.path.append("./stable_diffusion")
|
20 |
|
@@ -101,10 +102,12 @@ def main():
|
|
101 |
parser = ArgumentParser()
|
102 |
parser.add_argument("--resolution", default=512, type=int)
|
103 |
parser.add_argument("--config", default="configs/generate.yaml", type=str)
|
104 |
-
parser.add_argument("--ckpt", default="
|
105 |
parser.add_argument("--vae-ckpt", default=None, type=str)
|
106 |
args = parser.parse_args()
|
107 |
|
|
|
|
|
108 |
config = OmegaConf.load(args.config)
|
109 |
model = load_model_from_config(config, args.ckpt, args.vae_ckpt)
|
110 |
model.eval().cuda()
|
|
|
15 |
from omegaconf import OmegaConf
|
16 |
from PIL import Image, ImageOps
|
17 |
from torch import autocast
|
18 |
+
from huggingface_hub import hf_hub_download
|
19 |
|
20 |
sys.path.append("./stable_diffusion")
|
21 |
|
|
|
102 |
parser = ArgumentParser()
|
103 |
parser.add_argument("--resolution", default=512, type=int)
|
104 |
parser.add_argument("--config", default="configs/generate.yaml", type=str)
|
105 |
+
parser.add_argument("--ckpt", default="instruct-pix2pix-00-22000.ckpt", type=str)
|
106 |
parser.add_argument("--vae-ckpt", default=None, type=str)
|
107 |
args = parser.parse_args()
|
108 |
|
109 |
+
args.ckpt = hf_hub_download(repo_id="diffusers/pix2pix-sd", filename="instruct-pix2pix-00-22000.ckpt")
|
110 |
+
|
111 |
config = OmegaConf.load(args.config)
|
112 |
model = load_model_from_config(config, args.ckpt, args.vae_ckpt)
|
113 |
model.eval().cuda()
|