Spaces:
Running
on
Zero
Running
on
Zero
Update app_2.py
Browse files
app_2.py
CHANGED
@@ -102,17 +102,7 @@ ensure_directories()
|
|
102 |
|
103 |
download_models()
|
104 |
|
105 |
-
|
106 |
-
base_model="stabilityai/stable-diffusion-xl-base-1.0",
|
107 |
-
vae_model="madebyollin/sdxl-vae-fp16-fix",
|
108 |
-
unet_model=None,
|
109 |
-
lora_model=None,
|
110 |
-
adapter_path="huanngzh/mv-adapter",
|
111 |
-
scheduler=None,
|
112 |
-
num_views=NUM_VIEWS,
|
113 |
-
device=device,
|
114 |
-
dtype=dtype,
|
115 |
-
)
|
116 |
|
117 |
@spaces.GPU()
|
118 |
def infer(
|
@@ -171,6 +161,18 @@ if torch.cuda.is_available():
|
|
171 |
else:
|
172 |
device = torch.device('cpu')
|
173 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
# 'stablediffusionapi/realistic-vision-v51'
|
175 |
# 'runwayml/stable-diffusion-v1-5'
|
176 |
sd15_name = 'stablediffusionapi/realistic-vision-v51'
|
|
|
102 |
|
103 |
download_models()
|
104 |
|
105 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
|
107 |
@spaces.GPU()
|
108 |
def infer(
|
|
|
161 |
else:
|
162 |
device = torch.device('cpu')
|
163 |
|
164 |
+
pipe = prepare_pipeline(
|
165 |
+
base_model="stabilityai/stable-diffusion-xl-base-1.0",
|
166 |
+
vae_model="madebyollin/sdxl-vae-fp16-fix",
|
167 |
+
unet_model=None,
|
168 |
+
lora_model=None,
|
169 |
+
adapter_path="huanngzh/mv-adapter",
|
170 |
+
scheduler=None,
|
171 |
+
num_views=NUM_VIEWS,
|
172 |
+
device=device,
|
173 |
+
dtype=dtype,
|
174 |
+
)
|
175 |
+
|
176 |
# 'stablediffusionapi/realistic-vision-v51'
|
177 |
# 'runwayml/stable-diffusion-v1-5'
|
178 |
sd15_name = 'stablediffusionapi/realistic-vision-v51'
|