Skip to content

Commit 89e3563

Browse files
committed
update
1 parent 208af22 commit 89e3563

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/diffusers/models/auto_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def from_pretrained(cls, pretrained_model_or_path: Optional[Union[str, os.PathLi
194194

195195
has_remote_code = "auto_map" in config and cls.__name__ in config["auto_map"]
196196
trust_remote_code = resolve_trust_remote_code(trust_remote_code, pretrained_model_or_path, has_remote_code)
197-
if not (has_remote_code and trust_remote_code):
197+
if not has_remote_code and trust_remote_code:
198198
raise ValueError(
199199
"Selected model repository does not happear to have any custom code or does not have a valid `config.json` file."
200200
)

src/diffusers/modular_pipelines/modular_pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ def from_pretrained(
323323
trust_remote_code = resolve_trust_remote_code(
324324
trust_remote_code, pretrained_model_name_or_path, has_remote_code
325325
)
326-
if not (has_remote_code and trust_remote_code):
326+
if not has_remote_code and trust_remote_code:
327327
raise ValueError(
328328
"Selected model repository does not happear to have any custom code or does not have a valid `config.json` file."
329329
)

0 commit comments

Comments
 (0)