From a76f5c8555ce73c7e2ec45d6f9eb83807deacdeb Mon Sep 17 00:00:00 2001 From: City <125218114+city96@users.noreply.github.com> Date: Tue, 8 Aug 2023 12:19:39 +0200 Subject: [PATCH] Option to directly clone the repo to custom_nodes --- README.md | 4 +++- __init__.py | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 __init__.py diff --git a/README.md b/README.md index ce16c47..78abd46 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,9 @@ A small neural network to provide interoperability between the latents generated I wanted to see if it was possible to pass latents generated by the new SDXL model directly into SDv1.5 models without decoding and re-encoding them using a VAE first. ## Installation -To install it, simply download [comfy_latent_interposer.py](https://github.com/city96/SD-Latent-Interposer/raw/main/comfy_latent_interposer.py) to your `ComfyUI/custom_nodes` folder. You may need to install hfhub using the command `pip install huggingface-hub` inside your venv. +To install it, simply clone this repo to your custom_nodes folder using the following command: `git clone https://github.com/city96/SD-Latent-Interposer custom_nodes/SD-Latent-Interposer`. + +Alternatively, you can download the [comfy_latent_interposer.py](https://github.com/city96/SD-Latent-Interposer/raw/main/comfy_latent_interposer.py) file to your `ComfyUI/custom_nodes` folder as well. You may need to install hfhub using the command `pip install huggingface-hub` inside your venv. If you need the model weights for something else, they are [hosted on HF](https://huggingface.co/city96/SD-Latent-Interposer/tree/main) under the same Apache2 license as the rest of the repo. diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..3cdc7ca --- /dev/null +++ b/__init__.py @@ -0,0 +1,8 @@ +# only import if running as a custom node +try: + import comfy.utils +except ImportError: + pass +else: + from .comfy_latent_interposer import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS + __all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS']