Spaces:
Running
on
Zero
Running
on
Zero
cavargas10
commited on
Commit
•
3441bab
1
Parent(s):
9337be4
Update gradio_app/all_models.py
Browse files- gradio_app/all_models.py +22 -22
gradio_app/all_models.py
CHANGED
@@ -1,22 +1,22 @@
|
|
1 |
-
import torch
|
2 |
-
from scripts.sd_model_zoo import load_common_sd15_pipe
|
3 |
-
from diffusers import StableDiffusionControlNetImg2ImgPipeline, StableDiffusionPipeline
|
4 |
-
|
5 |
-
|
6 |
-
class MyModelZoo:
|
7 |
-
_pipe_disney_controlnet_lineart_ipadapter_i2i: StableDiffusionControlNetImg2ImgPipeline = None
|
8 |
-
|
9 |
-
base_model = "
|
10 |
-
|
11 |
-
def __init__(self, base_model=None) -> None:
|
12 |
-
if base_model is not None:
|
13 |
-
self.base_model = base_model
|
14 |
-
|
15 |
-
@property
|
16 |
-
def pipe_disney_controlnet_tile_ipadapter_i2i(self):
|
17 |
-
return self._pipe_disney_controlnet_lineart_ipadapter_i2i
|
18 |
-
|
19 |
-
def init_models(self):
|
20 |
-
self._pipe_disney_controlnet_lineart_ipadapter_i2i = load_common_sd15_pipe(base_model=self.base_model, ip_adapter=True, plus_model=False, controlnet="./ckpt/controlnet-tile", pipeline_class=StableDiffusionControlNetImg2ImgPipeline)
|
21 |
-
|
22 |
-
model_zoo = MyModelZoo()
|
|
|
1 |
+
import torch
|
2 |
+
from scripts.sd_model_zoo import load_common_sd15_pipe
|
3 |
+
from diffusers import StableDiffusionControlNetImg2ImgPipeline, StableDiffusionPipeline
|
4 |
+
|
5 |
+
|
6 |
+
class MyModelZoo:
|
7 |
+
_pipe_disney_controlnet_lineart_ipadapter_i2i: StableDiffusionControlNetImg2ImgPipeline = None
|
8 |
+
|
9 |
+
base_model = "benjamin-paine/stable-diffusion-v1-5"
|
10 |
+
|
11 |
+
def __init__(self, base_model=None) -> None:
|
12 |
+
if base_model is not None:
|
13 |
+
self.base_model = base_model
|
14 |
+
|
15 |
+
@property
|
16 |
+
def pipe_disney_controlnet_tile_ipadapter_i2i(self):
|
17 |
+
return self._pipe_disney_controlnet_lineart_ipadapter_i2i
|
18 |
+
|
19 |
+
def init_models(self):
|
20 |
+
self._pipe_disney_controlnet_lineart_ipadapter_i2i = load_common_sd15_pipe(base_model=self.base_model, ip_adapter=True, plus_model=False, controlnet="./ckpt/controlnet-tile", pipeline_class=StableDiffusionControlNetImg2ImgPipeline)
|
21 |
+
|
22 |
+
model_zoo = MyModelZoo()
|