StartHua / Comfyui_CXH_joy_caption

Recommended based on comfyui node pictures:Joy_caption + MiniCPMv2_6-prompt-generator + florence2
Apache License 2.0
399 stars 25 forks source link

Device loading issue (cpu/gpu) #13

Open DrJKL opened 2 months ago

DrJKL commented 2 months ago
Error occurred when executing Joy_caption:

Some modules are dispatched on the CPU or the disk. Make sure you have enough GPU RAM to fit the quantized model. If you want to dispatch the model on the CPU or the disk while keeping these modules in 32-bit, you need to set `load_in_8bit_fp32_cpu_offload=True` and pass a custom `device_map` to `from_pretrained`. Check https://huggingface.co/docs/transformers/main/en/main_classes/quantization#offload-between-cpu-and-gpu for more details. 
StartHua commented 2 months ago

显存不够

DrJKL commented 2 months ago

https://github.com/DrJKL/Comfyui_CXH_joy_caption/commit/18d9ab836ef336d828a1c978ddba6a517620e9f6

I tried switching the torch device management to use comfy's utility.

xm1085 commented 2 months ago

DrJKL@18d9ab8

I tried switching the torch device management to use comfy's utility.

我试过了,没有用