Spaces:
Running
on
Zero
Running
on
Zero
move Florence-2-base init to top,fail fast
Browse files
app.py
CHANGED
|
@@ -231,6 +231,16 @@ if "Florence2ModelLoader" in NODE_CLASS_MAPPINGS:
|
|
| 231 |
florence_class.INPUT_TYPES()
|
| 232 |
# =========================================================================
|
| 233 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 234 |
|
| 235 |
checkpointloadersimple = NODE_CLASS_MAPPINGS["CheckpointLoaderSimple"]()
|
| 236 |
checkpointloadersimple_50 = checkpointloadersimple.load_checkpoint(
|
|
@@ -248,8 +258,7 @@ print("load done: control_v11p_sd15_openpose.pth")
|
|
| 248 |
|
| 249 |
loadimage = NODE_CLASS_MAPPINGS["LoadImage"]()
|
| 250 |
|
| 251 |
-
|
| 252 |
-
florence2run = NODE_CLASS_MAPPINGS["Florence2Run"]()
|
| 253 |
|
| 254 |
|
| 255 |
|
|
@@ -343,13 +352,7 @@ model_management.load_models_gpu([
|
|
| 343 |
])
|
| 344 |
print("model_management.load_models_gpu(model_loaders) done")
|
| 345 |
|
| 346 |
-
|
| 347 |
-
model="Florence-2-base",
|
| 348 |
-
precision="fp16",
|
| 349 |
-
attention="sdpa",
|
| 350 |
-
convert_to_safetensors=False,
|
| 351 |
-
)
|
| 352 |
-
print("load done: Florence-2-base")
|
| 353 |
|
| 354 |
@spaces.GPU(duration=60)
|
| 355 |
def generate_image(model_image, hairstyle_template_image):
|
|
|
|
| 231 |
florence_class.INPUT_TYPES()
|
| 232 |
# =========================================================================
|
| 233 |
|
| 234 |
+
florence2modelloader = NODE_CLASS_MAPPINGS["Florence2ModelLoader"]()
|
| 235 |
+
florence2run = NODE_CLASS_MAPPINGS["Florence2Run"]()
|
| 236 |
+
florence2modelloader_204 = florence2modelloader.loadmodel(
|
| 237 |
+
model="Florence-2-base",
|
| 238 |
+
precision="fp16",
|
| 239 |
+
attention="sdpa",
|
| 240 |
+
convert_to_safetensors=False,
|
| 241 |
+
)
|
| 242 |
+
print("load done: Florence-2-base")
|
| 243 |
+
|
| 244 |
|
| 245 |
checkpointloadersimple = NODE_CLASS_MAPPINGS["CheckpointLoaderSimple"]()
|
| 246 |
checkpointloadersimple_50 = checkpointloadersimple.load_checkpoint(
|
|
|
|
| 258 |
|
| 259 |
loadimage = NODE_CLASS_MAPPINGS["LoadImage"]()
|
| 260 |
|
| 261 |
+
|
|
|
|
| 262 |
|
| 263 |
|
| 264 |
|
|
|
|
| 352 |
])
|
| 353 |
print("model_management.load_models_gpu(model_loaders) done")
|
| 354 |
|
| 355 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 356 |
|
| 357 |
@spaces.GPU(duration=60)
|
| 358 |
def generate_image(model_image, hairstyle_template_image):
|