Skip to content

Commit 7488d21

Browse files
authored
Merge branch 'main' into ltxv-lora
2 parents a193b60 + 915c537 commit 7488d21

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

docs/source/en/using-diffusers/inpaint.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ device = "cuda"
363363
pipeline = AutoPipelineForInpainting.from_pretrained(
364364
"runwayml/stable-diffusion-inpainting",
365365
torch_dtype=torch.float16,
366+
variant="fp16"
366367
)
367368
pipeline = pipeline.to(device)
368369

src/diffusers/loaders/lora_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,8 @@ def _best_guess_weight_name(
299299
targeted_files = list(filter(lambda x: x.endswith(LORA_WEIGHT_NAME_SAFE), targeted_files))
300300

301301
if len(targeted_files) > 1:
302-
raise ValueError(
303-
f"Provided path contains more than one weights file in the {file_extension} format. Either specify `weight_name` in `load_lora_weights` or make sure there's only one `.safetensors` or `.bin` file in {pretrained_model_name_or_path_or_dict}."
302+
logger.warning(
303+
f"Provided path contains more than one weights file in the {file_extension} format. `{targeted_files[0]}` is going to be loaded, for precise control, specify a `weight_name` in `load_lora_weights`."
304304
)
305305
weight_name = targeted_files[0]
306306
return weight_name

src/diffusers/utils/testing_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,8 +1212,8 @@ def _device_agnostic_dispatch(device: str, dispatch_table: Dict[str, Callable],
12121212

12131213
# Some device agnostic functions return values. Need to guard against 'None' instead at
12141214
# user level
1215-
if fn is None:
1216-
return None
1215+
if not callable(fn):
1216+
return fn
12171217

12181218
return fn(*args, **kwargs)
12191219

0 commit comments

Comments
 (0)