Skip to content
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

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

Closed
Gerkinfeltser opened this issue Feb 25, 2024 · 4 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request transpiler

Comments

@Gerkinfeltser
Copy link

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 Chaoses-Ib added documentation Improvements or additions to documentation transpiler labels Feb 25, 2024
@Chaoses-Ib
Copy link
Owner

Is there a way to disable this behavior?

Replace setup() here with pass:

try:
setup()
except ImportError as e:

what is the proper way to uninstall this extension?

python -m pip uninstall comfy-script

And delete ComfyScript directory.

@Gerkinfeltser
Copy link
Author

Thanks so much for this!

@Chaoses-Ib
Copy link
Owner

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

@Chaoses-Ib
Copy link
Owner

Chaoses-Ib commented May 3, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request transpiler
Projects
None yet
Development

No branches or pull requests

2 participants