multimodalart HF Staff commited on
Commit
7aa82a8
·
verified ·
1 Parent(s): fcb9ec2

make sure the error isnt checked if sampling is disabled

Browse files
ui/src/app/.DS_Store CHANGED
Binary files a/ui/src/app/.DS_Store and b/ui/src/app/.DS_Store differ
 
ui/src/components/HFJobsWorkflow.tsx CHANGED
@@ -258,10 +258,12 @@ export default function HFJobsWorkflow({ jobConfig, onComplete, hackathonEligibl
258
  throw new Error('Instruction models require a control dataset. Please select or upload a control dataset before continuing.');
259
  }
260
 
261
- const samples = jobConfig?.config?.process?.[0]?.sample?.samples ?? [];
262
- const missingCtrl = samples.filter((sample: any) => !sample?.ctrl_img || !String(sample.ctrl_img).trim());
263
- if (missingCtrl.length > 0) {
264
- throw new Error('Instruction models require a control image for every sample prompt. Please add control images before continuing.');
 
 
265
  }
266
  }
267
 
 
258
  throw new Error('Instruction models require a control dataset. Please select or upload a control dataset before continuing.');
259
  }
260
 
261
+ if (!samplingDisabled) {
262
+ const samples = jobConfig?.config?.process?.[0]?.sample?.samples ?? [];
263
+ const missingCtrl = samples.filter((sample: any) => !sample?.ctrl_img || !String(sample.ctrl_img).trim());
264
+ if (missingCtrl.length > 0) {
265
+ throw new Error('Instruction models require a control image for every sample prompt. Please add control images before continuing.');
266
+ }
267
  }
268
  }
269