Skip to content

Commit

Permalink
Stable Diffusion quick fix (#162)
Browse files Browse the repository at this point in the history
set default device ids

Co-authored-by: Jingya Huang <[email protected]>
  • Loading branch information
JingyaHuang and JingyaHuang authored Aug 7, 2023
1 parent c675fc0 commit 47f1299
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions optimum/neuron/modeling_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def _from_pretrained(
vae_decoder_file_name: Optional[str] = NEURON_FILE_NAME,
local_files_only: bool = False,
model_save_dir: Optional[Union[str, Path, TemporaryDirectory]] = None,
device_ids: Optional[List[int]] = None,
device_ids: Optional[List[int]] = [],
**kwargs, # To share kwargs only available for `_from_transformers`
):
model_id = str(model_id)
Expand Down Expand Up @@ -361,7 +361,7 @@ def _from_transformers(
disable_fast_relayout: Optional[bool] = False,
disable_fallback: bool = False,
dynamic_batch_size: bool = False,
device_ids: Optional[List[int]] = None,
device_ids: Optional[List[int]] = [],
**kwargs_shapes,
) -> "NeuronStableDiffusionPipelineBase":
if task is None:
Expand Down

0 comments on commit 47f1299

Please sign in to comment.