mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-10 23:01:22 +00:00
Compare commits
5 Commits
stable-cas
...
v0.8.5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b1520a46b | ||
|
|
f811b115ba | ||
|
|
2d7389185c | ||
|
|
fccbee2727 | ||
|
|
716a92cbed |
2
.github/workflows/typos.yml
vendored
2
.github/workflows/typos.yml
vendored
@@ -18,4 +18,4 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: typos-action
|
- name: typos-action
|
||||||
uses: crate-ci/typos@v1.16.26
|
uses: crate-ci/typos@v1.17.2
|
||||||
|
|||||||
10
README.md
10
README.md
@@ -249,6 +249,16 @@ ControlNet-LLLite, a novel method for ControlNet with SDXL, is added. See [docum
|
|||||||
|
|
||||||
## Change History
|
## Change History
|
||||||
|
|
||||||
|
### Mar 15, 2024 / 2024/3/15: v0.8.5
|
||||||
|
|
||||||
|
- Fixed a bug that the value of timestep embedding during SDXL training was incorrect.
|
||||||
|
- The inference with the generation script is also fixed.
|
||||||
|
- The impact is unknown, but please update for SDXL training.
|
||||||
|
|
||||||
|
- SDXL 学習時の timestep embedding の値が誤っていたのを修正しました。
|
||||||
|
- 生成スクリプトでの推論時についてもあわせて修正しました。
|
||||||
|
- 影響の度合いは不明ですが、SDXL の学習時にはアップデートをお願いいたします。
|
||||||
|
|
||||||
### Feb 24, 2024 / 2024/2/24: v0.8.4
|
### Feb 24, 2024 / 2024/2/24: v0.8.4
|
||||||
|
|
||||||
- The log output has been improved. PR [#905](https://github.com/kohya-ss/sd-scripts/pull/905) Thanks to shirayu!
|
- The log output has been improved. PR [#905](https://github.com/kohya-ss/sd-scripts/pull/905) Thanks to shirayu!
|
||||||
|
|||||||
@@ -3,11 +3,6 @@ import gc
|
|||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
|
||||||
from .utils import setup_logging
|
|
||||||
setup_logging()
|
|
||||||
import logging
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
HAS_CUDA = torch.cuda.is_available()
|
HAS_CUDA = torch.cuda.is_available()
|
||||||
except Exception:
|
except Exception:
|
||||||
@@ -64,7 +59,7 @@ def get_preferred_device() -> torch.device:
|
|||||||
device = torch.device("mps")
|
device = torch.device("mps")
|
||||||
else:
|
else:
|
||||||
device = torch.device("cpu")
|
device = torch.device("cpu")
|
||||||
logger.info(f"get_preferred_device() -> {device}")
|
print(f"get_preferred_device() -> {device}")
|
||||||
return device
|
return device
|
||||||
|
|
||||||
|
|
||||||
@@ -82,8 +77,8 @@ def init_ipex():
|
|||||||
|
|
||||||
is_initialized, error_message = ipex_init()
|
is_initialized, error_message = ipex_init()
|
||||||
if not is_initialized:
|
if not is_initialized:
|
||||||
logger.error("failed to initialize ipex: {error_message}")
|
print("failed to initialize ipex:", error_message)
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error("failed to initialize ipex: {e}")
|
print("failed to initialize ipex:", e)
|
||||||
|
|||||||
@@ -31,8 +31,10 @@ from torch import nn
|
|||||||
from torch.nn import functional as F
|
from torch.nn import functional as F
|
||||||
from einops import rearrange
|
from einops import rearrange
|
||||||
from .utils import setup_logging
|
from .utils import setup_logging
|
||||||
|
|
||||||
setup_logging()
|
setup_logging()
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
IN_CHANNELS: int = 4
|
IN_CHANNELS: int = 4
|
||||||
@@ -1074,7 +1076,7 @@ class SdxlUNet2DConditionModel(nn.Module):
|
|||||||
timesteps = timesteps.expand(x.shape[0])
|
timesteps = timesteps.expand(x.shape[0])
|
||||||
|
|
||||||
hs = []
|
hs = []
|
||||||
t_emb = get_timestep_embedding(timesteps, self.model_channels) # , repeat_only=False)
|
t_emb = get_timestep_embedding(timesteps, self.model_channels, downscale_freq_shift=0) # , repeat_only=False)
|
||||||
t_emb = t_emb.to(x.dtype)
|
t_emb = t_emb.to(x.dtype)
|
||||||
emb = self.time_embed(t_emb)
|
emb = self.time_embed(t_emb)
|
||||||
|
|
||||||
@@ -1132,7 +1134,7 @@ class InferSdxlUNet2DConditionModel:
|
|||||||
# call original model's methods
|
# call original model's methods
|
||||||
def __getattr__(self, name):
|
def __getattr__(self, name):
|
||||||
return getattr(self.delegate, name)
|
return getattr(self.delegate, name)
|
||||||
|
|
||||||
def __call__(self, *args, **kwargs):
|
def __call__(self, *args, **kwargs):
|
||||||
return self.delegate(*args, **kwargs)
|
return self.delegate(*args, **kwargs)
|
||||||
|
|
||||||
@@ -1164,7 +1166,7 @@ class InferSdxlUNet2DConditionModel:
|
|||||||
timesteps = timesteps.expand(x.shape[0])
|
timesteps = timesteps.expand(x.shape[0])
|
||||||
|
|
||||||
hs = []
|
hs = []
|
||||||
t_emb = get_timestep_embedding(timesteps, _self.model_channels) # , repeat_only=False)
|
t_emb = get_timestep_embedding(timesteps, _self.model_channels, downscale_freq_shift=0) # , repeat_only=False)
|
||||||
t_emb = t_emb.to(x.dtype)
|
t_emb = t_emb.to(x.dtype)
|
||||||
emb = _self.time_embed(t_emb)
|
emb = _self.time_embed(t_emb)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user