Skip to content

Commit

Permalink
bitsandbytes cpu offload logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Teriks committed Nov 3, 2024
1 parent d4f0007 commit 364433d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dgenerate/pipelinewrapper/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,9 @@ def enable_model_cpu_offload(pipeline: diffusers.DiffusionPipeline,
_bnb_utils._check_bnb_status(model)

if is_loaded_in_8bit_bnb:
_messages.debug_log(
f'Skipping cpu offload on 8-bit bitsandbytes '
f'quantized module: {model_str}={model.__class__.__name__}')
continue

_, hook = accelerate.cpu_offload_with_hook(model, device, prev_module_hook=hook)
Expand Down

0 comments on commit 364433d

Please sign in to comment.