Dreamspire commited on
Commit
d92d7f5
·
1 Parent(s): 3007757

Florence-2-base skip

Browse files
Files changed (1) hide show
  1. app.py +12 -10
app.py CHANGED
@@ -222,15 +222,7 @@ print("load done: control_v11p_sd15_openpose.pth")
222
  loadimage = NODE_CLASS_MAPPINGS["LoadImage"]()
223
 
224
 
225
- florence2modelloader = NODE_CLASS_MAPPINGS["Florence2ModelLoader"]()
226
- florence2modelloader_204 = florence2modelloader.loadmodel(
227
- model="Florence-2-base",
228
- precision="fp16",
229
- attention="sdpa",
230
- convert_to_safetensors=False,
231
- )
232
- print("load done: Florence-2-base")
233
- florence2run = NODE_CLASS_MAPPINGS["Florence2Run"]()
234
 
235
 
236
  checkpointloadersimple_319 = checkpointloadersimple.load_checkpoint(
@@ -308,7 +300,7 @@ print("load done")
308
  model_loaders = [
309
  checkpointloadersimple_50,
310
  controlnetloader_73,
311
- florence2modelloader_204,
312
  checkpointloadersimple_319,
313
  loraloader_338,
314
  loraloader_353,
@@ -324,6 +316,16 @@ print("model_management.load_models_gpu(model_loaders) done")
324
 
325
  @spaces.GPU(duration=60)
326
  def generate_image(model_image, hairstyle_template_image):
 
 
 
 
 
 
 
 
 
 
327
  with torch.inference_mode():
328
  cliptextencode_52 = cliptextencode.encode(
329
  text="multiple_hands, multiple_legs, multiple_girls\nlow quality, blurry, out of focus, distorted, unrealistic, extra limbs, missing limbs, deformed hands, deformed fingers, extra fingers, long neck, unnatural face, bad anatomy, bad proportions, poorly drawn face, poorly drawn eyes, asymmetrical eyes, extra eyes, extra head, floating objects, watermark, text, logo, jpeg artifacts, overexposed, underexposed, harsh lighting, bad posture, strange angles, unnatural expressions, oversaturated colors, messy hair, unrealistic skin texture, wrinkles inappropriately placed, incorrect shading, pixelation, complex background, busy background, detailed background, crowded scene, clutter, messy elements, unnecessary objects, overlapping objects, intricate patterns, vibrant colors, high contrast, graffiti, shadows, reflections, multiple layers, unrealistic lighting, overexposed areas.",
 
222
  loadimage = NODE_CLASS_MAPPINGS["LoadImage"]()
223
 
224
 
225
+
 
 
 
 
 
 
 
 
226
 
227
 
228
  checkpointloadersimple_319 = checkpointloadersimple.load_checkpoint(
 
300
  model_loaders = [
301
  checkpointloadersimple_50,
302
  controlnetloader_73,
303
+ # florence2modelloader_204,
304
  checkpointloadersimple_319,
305
  loraloader_338,
306
  loraloader_353,
 
316
 
317
  @spaces.GPU(duration=60)
318
  def generate_image(model_image, hairstyle_template_image):
319
+ florence2modelloader = NODE_CLASS_MAPPINGS["Florence2ModelLoader"]()
320
+ florence2modelloader_204 = florence2modelloader.loadmodel(
321
+ model="Florence-2-base",
322
+ precision="fp16",
323
+ attention="sdpa",
324
+ convert_to_safetensors=False,
325
+ )
326
+ print("load done: Florence-2-base")
327
+ florence2run = NODE_CLASS_MAPPINGS["Florence2Run"]()
328
+
329
  with torch.inference_mode():
330
  cliptextencode_52 = cliptextencode.encode(
331
  text="multiple_hands, multiple_legs, multiple_girls\nlow quality, blurry, out of focus, distorted, unrealistic, extra limbs, missing limbs, deformed hands, deformed fingers, extra fingers, long neck, unnatural face, bad anatomy, bad proportions, poorly drawn face, poorly drawn eyes, asymmetrical eyes, extra eyes, extra head, floating objects, watermark, text, logo, jpeg artifacts, overexposed, underexposed, harsh lighting, bad posture, strange angles, unnatural expressions, oversaturated colors, messy hair, unrealistic skin texture, wrinkles inappropriately placed, incorrect shading, pixelation, complex background, busy background, detailed background, crowded scene, clutter, messy elements, unnecessary objects, overlapping objects, intricate patterns, vibrant colors, high contrast, graffiti, shadows, reflections, multiple layers, unrealistic lighting, overexposed areas.",