Spaces:
Runtime error
Runtime error
Update app.py
Browse filesimprove sketch, canny, depth
app.py
CHANGED
|
@@ -30,7 +30,9 @@ urls = {
|
|
| 30 |
'models/t2iadapter_openpose_sd14v1.pth', 'models/t2iadapter_seg_sd14v1.pth',
|
| 31 |
'models/t2iadapter_sketch_sd14v1.pth', 'models/t2iadapter_depth_sd14v1.pth',
|
| 32 |
'third-party-models/body_pose_model.pth', "models/t2iadapter_style_sd14v1.pth",
|
| 33 |
-
"models/t2iadapter_canny_sd14v1.pth", 'third-party-models/table5_pidinet.pth'
|
|
|
|
|
|
|
| 34 |
],
|
| 35 |
'runwayml/stable-diffusion-v1-5': ['v1-5-pruned-emaonly.ckpt'],
|
| 36 |
'andite/anything-v4.0': ['anything-v4.0-pruned.ckpt', 'anything-v4.0.vae.pt'],
|
|
@@ -81,7 +83,10 @@ parser.add_argument(
|
|
| 81 |
global_opt = parser.parse_args()
|
| 82 |
global_opt.config = 'configs/stable-diffusion/sd-v1-inference.yaml'
|
| 83 |
for cond_name in supported_cond:
|
| 84 |
-
|
|
|
|
|
|
|
|
|
|
| 85 |
global_opt.device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")
|
| 86 |
global_opt.max_resolution = 512 * 512
|
| 87 |
global_opt.sampler = 'ddim'
|
|
|
|
| 30 |
'models/t2iadapter_openpose_sd14v1.pth', 'models/t2iadapter_seg_sd14v1.pth',
|
| 31 |
'models/t2iadapter_sketch_sd14v1.pth', 'models/t2iadapter_depth_sd14v1.pth',
|
| 32 |
'third-party-models/body_pose_model.pth', "models/t2iadapter_style_sd14v1.pth",
|
| 33 |
+
"models/t2iadapter_canny_sd14v1.pth", 'third-party-models/table5_pidinet.pth',
|
| 34 |
+
"models/t2iadapter_canny_sd15v2.pth", "models/t2iadapter_depth_sd15v2.pth",
|
| 35 |
+
"models/t2iadapter_sketch_sd15v2.pth"
|
| 36 |
],
|
| 37 |
'runwayml/stable-diffusion-v1-5': ['v1-5-pruned-emaonly.ckpt'],
|
| 38 |
'andite/anything-v4.0': ['anything-v4.0-pruned.ckpt', 'anything-v4.0.vae.pt'],
|
|
|
|
| 83 |
global_opt = parser.parse_args()
|
| 84 |
global_opt.config = 'configs/stable-diffusion/sd-v1-inference.yaml'
|
| 85 |
for cond_name in supported_cond:
|
| 86 |
+
if cond_name in ['sketch', 'depth', 'canny']:
|
| 87 |
+
setattr(global_opt, f'{cond_name}_adapter_ckpt', f'models/t2iadapter_{cond_name}_sd15v2.pth')
|
| 88 |
+
else:
|
| 89 |
+
setattr(global_opt, f'{cond_name}_adapter_ckpt', f'models/t2iadapter_{cond_name}_sd14v1.pth')
|
| 90 |
global_opt.device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")
|
| 91 |
global_opt.max_resolution = 512 * 512
|
| 92 |
global_opt.sampler = 'ddim'
|