mirror of
https://github.com/ostris/ai-toolkit.git
synced 2026-04-30 11:11:37 +00:00
Fixed issue where sampling fails if doing a full finetune for some models
This commit is contained in:
@@ -343,7 +343,7 @@ class BaseModel:
|
|||||||
pipeline: Union[None, StableDiffusionPipeline,
|
pipeline: Union[None, StableDiffusionPipeline,
|
||||||
StableDiffusionXLPipeline] = None,
|
StableDiffusionXLPipeline] = None,
|
||||||
):
|
):
|
||||||
network = unwrap_model(self.network)
|
network = self.network
|
||||||
merge_multiplier = 1.0
|
merge_multiplier = 1.0
|
||||||
flush()
|
flush()
|
||||||
# if using assistant, unfuse it
|
# if using assistant, unfuse it
|
||||||
@@ -364,6 +364,7 @@ class BaseModel:
|
|||||||
self.assistant_lora.force_to(self.device_torch, self.torch_dtype)
|
self.assistant_lora.force_to(self.device_torch, self.torch_dtype)
|
||||||
|
|
||||||
if network is not None:
|
if network is not None:
|
||||||
|
network = unwrap_model(self.network)
|
||||||
network.eval()
|
network.eval()
|
||||||
# check if we have the same network weight for all samples. If we do, we can merge in th
|
# check if we have the same network weight for all samples. If we do, we can merge in th
|
||||||
# the network to drastically speed up inference
|
# the network to drastically speed up inference
|
||||||
|
|||||||
Reference in New Issue
Block a user