### Install QuantFunc for ComfyUI Source: https://quantfunc.com Commands to clone the repository into the ComfyUI custom nodes directory and install required dependencies. ```bash cd ComfyUI/custom_nodes git clone https://github.com/RealJonathanYip/ComfyUI-QuantFunc.git pip install -r ComfyUI-QuantFunc/requirements.txt ``` -------------------------------- ### Install QuantFunc ComfyUI Plugin Source: https://quantfunc.com Use this command to clone the QuantFunc repository into your ComfyUI custom nodes directory. ```bash cd ComfyUI/custom_nodes && git clone https://github.com/RealJonathanYip/ComfyUI-QuantFunc.git ``` -------------------------------- ### Initialize and run a QuantFunc pipeline Source: https://quantfunc.com Uses the QuantFuncPipeline to load a model with a specified VRAM budget and generate an image from a text prompt. ```python 1import os2import quantfunc as qf3 4with qf.QuantFuncPipeline.from_pretrained(5 diffusers_model_path="/models/Z-Image-Turbo",6 api_key=os.environ["QUANTFUNC_API_KEY"],7 vram_budget=0.8, # 80% of the card; "8g"/"12288mb" too8) as pipe:9 out = pipe("a neon city at night", width=1024, height=1024, step=8)10 out.save("out.png")11 print("seed", out.seed, round(out.elapsed_seconds, 2), "s") ``` -------------------------------- ### QuantFuncPipeline.from_pretrained Source: https://quantfunc.com Initializes a quantized model pipeline from a specified path and generates an image based on a text prompt. ```APIDOC ## Python SDK: QuantFuncPipeline ### Description Initializes a model pipeline using the `from_pretrained` method and executes image generation with specified dimensions and steps. ### Method Python SDK Method ### Parameters - **diffusers_model_path** (string) - Required - The local path to the pre-trained model. - **api_key** (string) - Required - The QuantFunc API key for authentication. - **vram_budget** (float/string) - Optional - The VRAM allocation limit (e.g., 0.8, "8g", or "12288mb"). ### Generation Parameters - **prompt** (string) - Required - The text description for image generation. - **width** (int) - Optional - The width of the output image. - **height** (int) - Optional - The height of the output image. - **step** (int) - Optional - The number of inference steps. ### Example ```python import os import quantfunc as qf with qf.QuantFuncPipeline.from_pretrained( diffusers_model_path="/models/Z-Image-Turbo", api_key=os.environ["QUANTFUNC_API_KEY"], vram_budget=0.8 ) as pipe: out = pipe("a neon city at night", width=1024, height=1024, step=8) out.save("out.png") ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.