-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node example -> Class CoreMLExecution is implemented in both #10
Comments
Building for source and using examples seem to be working fine, so likely an issue with dependencies in published version, haven't investigated it further yet. |
Same error:
My code: const generateImage = async () => {
const pipe = DiffusionPipeline.fromPretrained('aislamov/stable-diffusion-2-1-base-onnx', { revision: 'cpu' })
const images = pipe.run({
prompt: "an astronaut running a horse",
numInferenceSteps: 30,
});
const data = await images[0].mul(255).round().clipByValue(0, 255).transpose(0, 2, 3, 1);
const p = new PNG({ width: 512, height: 512, inputColorType: 2 });
p.data = Buffer.from(data.data);
p.pack().pipe(fs.createWriteStream('output.png')).on('finish', () => {
console.log('Image saved as output.png');
});
setImageData(p.data);
}; |
Hey, its a promise, u have to call "await": const pipe = await DiffusionPipeline.fromPretrained('aislamov/stable-diffusion-2-1-base-onnx', { revision: 'cpu' }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just tried node example (with node v20.10.0)
and got such error
The text was updated successfully, but these errors were encountered: