cog-face-to-many
cog-face-to-many copied to clipboard
Problem status 422
Hello everyone. I got next issue : Error: ApiError: Request to https://api.replicate.com/v1/predictions failed with status 422 Unprocessable Entity: {"title":"Invalid version or not permitted","detail":"The specified version does not exist (or perhaps you don't have permission to use it?)","status":422}
Here is the code :
import Replicate from 'replicate'
import dotenv from 'dotenv'
import { readFile } from 'node:fs/promises';
const image = await readFile('./assets/picture.png');
dotenv.config()
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
userAgent: 'https://www.npmjs.com/package/create-replicate'
})
const model =
'fofr/face-to-many:4912b99b3b101a70ae4af66c989d98f5b354c63fb8c4b5a248a299ac244242ed';
const input = {
image: image,
style: 'Video game',
prompt: 'a person in a ps2 horror game',
negative_prompt: '',
prompt_strength: 4.5,
denoising_strength: 0.65,
instant_id_strength: 0.8,
};
console.log({ model, input })
console.log('Running...')
try {
const output = await replicate.run(model, { input });
console.log('Done!', output);
} catch (error) {
console.error('Error:', error);
}
Maybe someone had this problem. I'd be grateful for support! I want to ask if this api is free? I didn't pay so maybe this is the problem. Thanks.