mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
fix t2i-color adapter
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
- fix starting from non git repo
|
||||
- fix control api negative prompt handling
|
||||
- fix saving style without name provided
|
||||
- fix t2i-color adapter
|
||||
- restructure api examples: `cli/api-*`
|
||||
- handle theme fallback when invalid theme is specified
|
||||
- remove obsolete training code leftovers
|
||||
|
||||
@@ -74,7 +74,7 @@ class Adapter():
|
||||
self.model_id: str = model_id
|
||||
self.device = device
|
||||
self.dtype = dtype
|
||||
self.load_config = { 'cache_dir': cache_dir }
|
||||
self.load_config = { 'cache_dir': cache_dir, 'use_safetensors': False }
|
||||
if load_config is not None:
|
||||
self.load_config.update(load_config)
|
||||
if model_id is not None:
|
||||
@@ -101,7 +101,7 @@ class Adapter():
|
||||
log.error(f'Control {what} model load failed: id="{model_id}" error=unknown model id')
|
||||
return
|
||||
log.debug(f'Control {what} model loading: id="{model_id}" path="{model_path}"')
|
||||
if model_path.endswith('.pth') or model_path.endswith('.pt') or model_path.endswith('.safetensors'):
|
||||
if model_path.endswith('.pth') or model_path.endswith('.pt') or model_path.endswith('.safetensors') or model_path.endswith('.bin'):
|
||||
from huggingface_hub import hf_hub_download
|
||||
parts = model_path.split('/')
|
||||
repo_id = f'{parts[0]}/{parts[1]}'
|
||||
|
||||
Reference in New Issue
Block a user