Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9667fff

Browse files
committed
fix download for sd15/sdxl reference models
Signed-off-by: Vladimir Mandic <[email protected]>
1 parent a9fb098 commit 9667fff

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Change Log for SD.Next
22

3-
## Update for 2025-09-19
3+
## Update for 2025-09-20
44

55
- **Models**
66
- [WAN 2.2 14B VACE](https://huggingface.co/alibaba-pai/Wan2.2-VACE-Fun-A14B)
@@ -27,6 +27,7 @@
2727
- framepack: add explicit hf-login before framepack load
2828
- benchmark: remove forced sampler from system info benchmark
2929
- xyz-grid: fix xyz grid with random seeds
30+
- fix download for sd15/sdxl reference models
3031

3132
## Update for 2025-09-15
3233

modules/civitai/download_civitai.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,11 @@ def download_civit_model_thread(model_name: str, model_url: str, model_path: str
103103
if os.path.isfile(temp_file):
104104
starting_pos = os.path.getsize(temp_file)
105105
headers['Range'] = f'bytes={starting_pos}-'
106-
if token is None or len(token) == 0:
107-
token = shared.opts.civitai_token
108-
if token is not None and len(token) > 0:
109-
headers['Authorization'] = f'Bearer {token}'
106+
if ('civit' in model_url.lower()):
107+
if token is None or len(token) == 0:
108+
token = shared.opts.civitai_token
109+
if (token is not None) and (len(token) > 0):
110+
headers['Authorization'] = f'Bearer {token}'
110111

111112
r = shared.req(model_url, headers=headers, stream=True)
112113
total_size = int(r.headers.get('content-length', 0))

modules/lora/lora_overrides.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ def get_method(shorthash=''):
6161
use_diffusers = use_diffusers or any(x.startswith(shorthash) for x in maybe_diffusers)
6262
if shared.opts.lora_force_diffusers and len(shorthash) > 4:
6363
use_diffusers = use_diffusers or any(x.startswith(shorthash) for x in force_diffusers)
64-
use_nunchaku = hasattr(shared.sd_model, 'transformer') and 'Nunchaku' in shared.sd_model.transformer.__class__.__name__
64+
nunchaku_dit = hasattr(shared.sd_model, 'transformer') and 'Nunchaku' in shared.sd_model.transformer.__class__.__name__
65+
nunchaku_unet = hasattr(shared.sd_model, 'unet') and 'Nunchaku' in shared.sd_model.unet.__class__.__name__
66+
use_nunchaku = nunchaku_dit or nunchaku_unet
6567
if use_nunchaku:
6668
return 'nunchaku'
6769
elif use_diffusers:

0 commit comments

Comments
 (0)