Chaoses-Ib / ComfyScript

A Python frontend and library for ComfyUI
MIT License
389 stars 21 forks source link

How to disable custom ComfyScript image metadata injection? & How to properly uninstall? #27

Closed Gerkinfeltser closed 5 months ago

Gerkinfeltser commented 7 months ago

Hi, while the extension is interesting I don't like the extra metadata that gets injected into all generated images. Is there a way to disable this behavior?

Also, what is the proper way to uninstall this extension? Thank you!

Chaoses-Ib commented 7 months ago

Is there a way to disable this behavior?

Replace setup() here with pass:

https://github.com/Chaoses-Ib/ComfyScript/blob/327a5b76edca4afffd5d4108016b2b0ddc32dd4e/src/comfy_script/nodes/__init__.py#L167-L169

what is the proper way to uninstall this extension?

python -m pip uninstall comfy-script

And delete ComfyScript directory.

Gerkinfeltser commented 7 months ago

Thanks so much for this!

Chaoses-Ib commented 7 months ago

This issue can be kept open to help other people. I'll add some config options for the transpiler in the future.

Chaoses-Ib commented 5 months ago

Now this behavior can be disabled by adding a settings.toml file at the repository root with the following content:

# These settings can also be overriden by:
# - Environment variables
#   e.g. `COMFY_SCRIPT_TRANSPILE_HOOK_ENABLED=false`
# - Python code
#   e.g.
#   ```python
#   from comfy_script.config import settings
#   settings.transpile.hook.enabled=False
#   ```

[transpile.hook]
# When ComfyScript is installed as custom nodes, `SaveImage` and similar nodes will be hooked to automatically save the script as the image's metadata. The script will also be printed to the terminal.
# To disable a feature, change its value to `false`.
save_script = false
print_script = true