Spaces:
Runtime error
Runtime error
update composable adapter (#7)
Browse files- update app.py (751fdf757a71b73a57d904eb51f96aba67b9b95b)
app.py
CHANGED
|
@@ -15,12 +15,9 @@ from huggingface_hub import hf_hub_url
|
|
| 15 |
from pytorch_lightning import seed_everything
|
| 16 |
from torch import autocast
|
| 17 |
|
| 18 |
-
from ldm.inference_base import (DEFAULT_NEGATIVE_PROMPT, diffusion_inference,
|
| 19 |
-
get_adapters, get_sd_models)
|
| 20 |
from ldm.modules.extra_condition import api
|
| 21 |
-
from ldm.modules.extra_condition.api import (ExtraCondition,
|
| 22 |
-
get_adapter_feature,
|
| 23 |
-
get_cond_model)
|
| 24 |
|
| 25 |
torch.set_grad_enabled(False)
|
| 26 |
|
|
@@ -33,7 +30,7 @@ urls = {
|
|
| 33 |
'models/t2iadapter_openpose_sd14v1.pth', 'models/t2iadapter_seg_sd14v1.pth',
|
| 34 |
'models/t2iadapter_sketch_sd14v1.pth', 'models/t2iadapter_depth_sd14v1.pth',
|
| 35 |
'third-party-models/body_pose_model.pth', "models/t2iadapter_style_sd14v1.pth",
|
| 36 |
-
"models/t2iadapter_canny_sd14v1.pth"
|
| 37 |
],
|
| 38 |
'runwayml/stable-diffusion-v1-5': ['v1-5-pruned-emaonly.ckpt'],
|
| 39 |
'andite/anything-v4.0': ['anything-v4.0-pruned.ckpt', 'anything-v4.0.vae.pt'],
|
|
@@ -299,4 +296,4 @@ with gr.Blocks(css='style.css') as demo:
|
|
| 299 |
|
| 300 |
inps.extend([prompt, neg_prompt, scale, n_samples, seed, steps, resize_short_edge, cond_tau])
|
| 301 |
submit.click(fn=run, inputs=inps, outputs=[output, cond])
|
| 302 |
-
demo.launch(server_name='0.0.0.0'
|
|
|
|
| 15 |
from pytorch_lightning import seed_everything
|
| 16 |
from torch import autocast
|
| 17 |
|
| 18 |
+
from ldm.inference_base import (DEFAULT_NEGATIVE_PROMPT, diffusion_inference, get_adapters, get_sd_models)
|
|
|
|
| 19 |
from ldm.modules.extra_condition import api
|
| 20 |
+
from ldm.modules.extra_condition.api import (ExtraCondition, get_adapter_feature, get_cond_model)
|
|
|
|
|
|
|
| 21 |
|
| 22 |
torch.set_grad_enabled(False)
|
| 23 |
|
|
|
|
| 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"
|
| 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'],
|
|
|
|
| 296 |
|
| 297 |
inps.extend([prompt, neg_prompt, scale, n_samples, seed, steps, resize_short_edge, cond_tau])
|
| 298 |
submit.click(fn=run, inputs=inps, outputs=[output, cond])
|
| 299 |
+
demo.queue().launch(debug=True, server_name='0.0.0.0')
|