fffiloni commited on
Commit
c1ce6f3
·
verified ·
1 Parent(s): a721627

fix(app): handle dtype alignment for style/subject reference pipelines

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -313,6 +313,10 @@ def infer_compo(style_description, ref_style_file, caption, ref_sub_file, use_lo
313
  batch['style'] = ref_style_for_clip
314
  batch['images'] = ref_images_for_clip
315
 
 
 
 
 
316
  progress(0.2, "Processing reference images")
317
  x0_forward = models_rbm.effnet(
318
  extras.effnet_preprocess(ref_images_for_effnet)
@@ -340,11 +344,11 @@ def infer_compo(style_description, ref_style_file, caption, ref_sub_file, use_lo
340
  eval_image_embeds=False, eval_subject_style=True
341
  )
342
  conditions_b = core_b.get_conditions(
343
- batch, models_b, extras_b,
344
  is_eval=True, is_unconditional=False
345
  )
346
  unconditions_b = core_b.get_conditions(
347
- batch, models_b, extras_b,
348
  is_eval=True, is_unconditional=True
349
  )
350
 
 
313
  batch['style'] = ref_style_for_clip
314
  batch['images'] = ref_images_for_clip
315
 
316
+ batch_b = {'captions': [caption] * batch_size}
317
+ batch_b['style'] = ref_style_for_effnet
318
+ batch_b['images'] = ref_images_for_effnet
319
+
320
  progress(0.2, "Processing reference images")
321
  x0_forward = models_rbm.effnet(
322
  extras.effnet_preprocess(ref_images_for_effnet)
 
344
  eval_image_embeds=False, eval_subject_style=True
345
  )
346
  conditions_b = core_b.get_conditions(
347
+ batch_b, models_b, extras_b,
348
  is_eval=True, is_unconditional=False
349
  )
350
  unconditions_b = core_b.get_conditions(
351
+ batch_b, models_b, extras_b,
352
  is_eval=True, is_unconditional=True
353
  )
354