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

readme is unclear (update it with more detail) #12

Open
fractalfantasy opened this issue May 27, 2024 · 3 comments
Open

readme is unclear (update it with more detail) #12

fractalfantasy opened this issue May 27, 2024 · 3 comments

Comments

@fractalfantasy
Copy link

Took me a few days to understand how to build the engine, so im putting this here to help other people:

  1. git clone the repo to your custom_nodes directory

  2. navigate command prompt to ComfyUI-Upscaler-Tensorrt directory and install it:
    pip install -r requirements.txt

  3. download onnx files to this directory:
    ..\ComfyUI\app\models\tensorrt\upscaler\onnx

  4. run engine builder script from ComfyUI-Upscaler-Tensorrt directory to build the engine.
    python export_trt.py
    Enter the path to save the TensorRT engine (e.g ./realesrgan.engine):
    ..\ComfyUI\app\models\tensorrt\upscaler\4x_foolhardy_Remacri.engine
    Enter the path to the ONNX model (e.g ./realesrgan.onnx):
    ..\ComfyUI\app\models\tensorrt\upscaler\onnx\4x_foolhardy_Remacri.onnx

  • do not create a .engine directory/file before you run the script, it will automatically create this file for you. just give it the filepath for the future .engine file , see my example above
  • there should not be quotes '' around the paths

once the engine(s) are built!!

  1. open the node in ComfyUi and place it at the end of your IMAGE chain

right click >> add node >> tensorrt >> Upscale Tensorrt

image
  1. pick your .engine file and run it, it should upscale the image :)
@yuvraj108c yuvraj108c pinned this issue May 29, 2024
@yuvraj108c
Copy link
Owner

Thanks for the detailed guide, I pinned the issue :)

@DarkAlchy
Copy link

DarkAlchy commented Jun 11, 2024

On Windows if you are in the directory with the export_trt.py the required way to path is "../../../" not the single ".." fractalfantasy said because, for me at least, I use the venv version (no portable nonsense for me again) and it is two levels deeper and remove the "\app" as that is part of portable version nonsense.

@RONNYKHALIL
Copy link

thank uuuu! this saved me from another hour of bashing head on keyboard 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants