-
Notifications
You must be signed in to change notification settings - Fork 11
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
CLI doesn't appear to work, output is minified JavaScript. #9
Comments
UPDATE: turns out I was using standard workflow.json instead of api json. I tried with api json and it is still broken. |
Yes, you should indeed be using an API format JSON file to generate the code. Could you share your JSON file (in API format)? Also, could you provide the broken error message you're encountering? |
Hello, here's the json:
That is in API format. The error I get is yarn cuc-w2c -i ./src/workflows/jsons/simple-api.json -t none
/home/cameronellis/work/komfy/node_modules/.bin/cuc-w2c: 1: Syntax error: "(" unexpected
error Command failed with exit code 2.``` |
I tried the JSON you provided, and I can output it normally. The result is as follows: const [MODEL_1, CLIP_1, VAE_1] = cls.CheckpointLoaderSimple({
ckpt_name: "aniverseXL_v10.safetensors",
});
const [CONDITIONING_2] = cls.CLIPTextEncode({
text: "",
clip: CLIP_1,
});
const [CONDITIONING_1] = cls.CLIPTextEncode({
text: "",
clip: CLIP_1,
});
const [IMAGE_1, MASK_1] = cls.LoadImage({
image: "image.png",
upload: "image",
});
const [LATENT_1] = cls.VAEEncode({
pixels: IMAGE_1,
vae: VAE_1,
});
const [LATENT_2] = cls.KSampler({
seed: 223493558817724,
steps: 20,
cfg: 8,
sampler_name: "euler",
scheduler: "normal",
denoise: 1,
model: MODEL_1,
positive: CONDITIONING_1,
negative: CONDITIONING_2,
latent_image: LATENT_1,
});
const [IMAGE_2] = cls.VAEDecode({
samples: LATENT_2,
vae: VAE_1,
});
const [] = cls.PreviewImage({
images: IMAGE_2,
}); One possible issue could be that your Node.js version does not support certain packaging features. Since the CLI tool is now pre-packaged into a You can try running the script directly using Additionally, regarding the minified output you mentioned earlier, it's likely caused by the Thank you for your feedback! Please give it another try and let us know how it goes. |
Describe the bug
The cli does not write to the
-o <file>.js
, and only outputs to stdio..nvm/versions/node/v20.9.0/bin/cuc-w2c: line 1: syntax error near unexpected token
('`Example:
To Reproduce
I have a simple json like this:
simple.json
Install:
npm install -g @stable-canvas/comfyui-client-cli
Run
cuc-w2c -i simple.json -t cjs -o whatever.js
Expected behavior
whatever.js is populated per the readme.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: