replicate/replicate-javascript

getting an empty.zip when running my model with prompt

echoedexistence opened this issue · 2 comments

my code is the following

async function createPrediction() {
  try {
    const output = await replicate.run(
      "aherlambang/nanakoo:6926ec72ebff4b9b616726f0bc473a3d71da230b4d42cb8aaa376e1971902ef4",
      {
         input: {
            prompt: "nanakoo is sitting on a chair",
            disable_safety_checker: true,
            output_quality: 100,
            output_format: "jpg",
            hf_lora: "aherlambang/nanakoo"
          },
      }
  );

  	console.log(output);
  } catch (error) {
    console.error("Error creating prediction:", error);
  }
}

when ever i run this it always gives me an empty.zip , what did i do wrong ? the training went successful



createPrediction();
mattt commented

@aherlambang What do you see in the logs?

const model = "aherlambang/nanakoo:6926ec72ebff4b9b616726f0bc473a3d71da230b4d42cb8aaa376e1971902ef4";
const input = {
   prompt: "nanakoo is sitting on a chair",
   disable_safety_checker: true,
   output_quality: 100,
   output_format: "jpg",
   hf_lora: "aherlambang/nanakoo"
};
const onProgress = (prediction) => {
   const last_log_line = prediction.logs.split("\n").pop();
   console.log({ id: prediction.id, log: last_log_line });
};
const output = await replicate.run(model, { input }, onProgress);
mattt commented

Closing this for now. Happy to reopen if you can share any more information.