Closed PhilippeMoussalli closed 1 year ago
The notebook hangs after executing the pipeline? Did you run into this as well?
The notebook hangs after executing the pipeline? Did you run into this as well?
For me it seems ok, could the next cell be the one that's hanging?
Seems like it hangs after the download_images
component, while there's two more steps. I see yours ended after download_images
?
This is probably due to them being GPU components. I think they no longer work on CPU since we changed the base image.
Seems like it hangs after the
download_images
component, while there's two more steps. I see yours ended afterdownload_images
?
I think it's because you don't have a gpu that's set but in the compose spec GPU is set, so it's probably not finding the hardware. Removing the GPU from the op should resolve it
You're right, it's due to the GPU in the ComponentOp
. Maybe we should comment those out in the notebook?
You're right, it's due to the GPU in the
ComponentOp
. Maybe we should comment those out in the notebook?
The recommended way for this pipeline is to run it on a GPU (mentioned in the prerequisites) not sure if the model can properly load with a cpu in place.
People don't read :stuck_out_tongue:
The components do work on cpu. We could do something like this:
import logging
import subprocess
try:
subprocess.check_output('nvidia-smi')
gpu = 1
except Exception:
logging.warning("We recommend to run this pipeline on a GPU, but none could be found")
gpu = 0
caption_images_op = ComponentOp.from_registry(
name="caption_images",
...
number_of_accelerators=gpu,
accelerator_name="GPU",
)
segment_images_op = ComponentOp.from_registry(
name="segment_images",
...
number_of_accelerators=gpu,
accelerator_name="GPU",
)
People don't read 😛
The components do work on cpu. We could do something like this:
import logging import subprocess try: subprocess.check_output('nvidia-smi') gpu = 1 except Exception: logging.warning("We recommend to run this pipeline on a GPU, but none could be found") gpu = 0
caption_images_op = ComponentOp.from_registry( name="caption_images", ... number_of_accelerators=gpu, accelerator_name="GPU", ) segment_images_op = ComponentOp.from_registry( name="segment_images", ... number_of_accelerators=gpu, accelerator_name="GPU", )
Ok I think that makes the most sense :P will add it here and on datacomp
Add controlnet pipeline