Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7d52558c15 | |||
| 3efe355d52 |
@@ -538,7 +538,7 @@ class StableDiffusionReferencePipeline(StableDiffusionPipeline):
|
|||||||
|
|
||||||
return hidden_states, output_states
|
return hidden_states, output_states
|
||||||
|
|
||||||
def hacked_DownBlock2D_forward(self, hidden_states, temb=None):
|
def hacked_DownBlock2D_forward(self, hidden_states, temb=None, **kwargs):
|
||||||
eps = 1e-6
|
eps = 1e-6
|
||||||
|
|
||||||
output_states = ()
|
output_states = ()
|
||||||
@@ -634,7 +634,9 @@ class StableDiffusionReferencePipeline(StableDiffusionPipeline):
|
|||||||
|
|
||||||
return hidden_states
|
return hidden_states
|
||||||
|
|
||||||
def hacked_UpBlock2D_forward(self, hidden_states, res_hidden_states_tuple, temb=None, upsample_size=None):
|
def hacked_UpBlock2D_forward(
|
||||||
|
self, hidden_states, res_hidden_states_tuple, temb=None, upsample_size=None, **kwargs
|
||||||
|
):
|
||||||
eps = 1e-6
|
eps = 1e-6
|
||||||
for i, resnet in enumerate(self.resnets):
|
for i, resnet in enumerate(self.resnets):
|
||||||
# pop res hidden states
|
# pop res hidden states
|
||||||
|
|||||||
@@ -507,7 +507,7 @@ class StableDiffusionXLReferencePipeline(StableDiffusionXLPipeline):
|
|||||||
|
|
||||||
return hidden_states, output_states
|
return hidden_states, output_states
|
||||||
|
|
||||||
def hacked_DownBlock2D_forward(self, hidden_states, temb=None):
|
def hacked_DownBlock2D_forward(self, hidden_states, temb=None, **kwargs):
|
||||||
eps = 1e-6
|
eps = 1e-6
|
||||||
|
|
||||||
output_states = ()
|
output_states = ()
|
||||||
@@ -603,7 +603,9 @@ class StableDiffusionXLReferencePipeline(StableDiffusionXLPipeline):
|
|||||||
|
|
||||||
return hidden_states
|
return hidden_states
|
||||||
|
|
||||||
def hacked_UpBlock2D_forward(self, hidden_states, res_hidden_states_tuple, temb=None, upsample_size=None):
|
def hacked_UpBlock2D_forward(
|
||||||
|
self, hidden_states, res_hidden_states_tuple, temb=None, upsample_size=None, **kwargs
|
||||||
|
):
|
||||||
eps = 1e-6
|
eps = 1e-6
|
||||||
for i, resnet in enumerate(self.resnets):
|
for i, resnet in enumerate(self.resnets):
|
||||||
# pop res hidden states
|
# pop res hidden states
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ version_range_max = max(sys.version_info[1], 10) + 1
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="diffusers",
|
name="diffusers",
|
||||||
version="0.26.1", # expected format is one of x.y.z.dev0, or x.y.z.rc1 or x.y.z (no to dashes, yes to dots)
|
version="0.26.2", # expected format is one of x.y.z.dev0, or x.y.z.rc1 or x.y.z (no to dashes, yes to dots)
|
||||||
description="State-of-the-art diffusion in PyTorch and JAX.",
|
description="State-of-the-art diffusion in PyTorch and JAX.",
|
||||||
long_description=open("README.md", "r", encoding="utf-8").read(),
|
long_description=open("README.md", "r", encoding="utf-8").read(),
|
||||||
long_description_content_type="text/markdown",
|
long_description_content_type="text/markdown",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
__version__ = "0.26.1"
|
__version__ = "0.26.2"
|
||||||
|
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
|
|||||||
@@ -158,6 +158,12 @@ class BasicTransformerBlock(nn.Module):
|
|||||||
super().__init__()
|
super().__init__()
|
||||||
self.only_cross_attention = only_cross_attention
|
self.only_cross_attention = only_cross_attention
|
||||||
|
|
||||||
|
self.use_ada_layer_norm_zero = (num_embeds_ada_norm is not None) and norm_type == "ada_norm_zero"
|
||||||
|
self.use_ada_layer_norm = (num_embeds_ada_norm is not None) and norm_type == "ada_norm"
|
||||||
|
self.use_ada_layer_norm_single = norm_type == "ada_norm_single"
|
||||||
|
self.use_layer_norm = norm_type == "layer_norm"
|
||||||
|
self.use_ada_layer_norm_continuous = norm_type == "ada_norm_continuous"
|
||||||
|
|
||||||
if norm_type in ("ada_norm", "ada_norm_zero") and num_embeds_ada_norm is None:
|
if norm_type in ("ada_norm", "ada_norm_zero") and num_embeds_ada_norm is None:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"`norm_type` is set to {norm_type}, but `num_embeds_ada_norm` is not defined. Please make sure to"
|
f"`norm_type` is set to {norm_type}, but `num_embeds_ada_norm` is not defined. Please make sure to"
|
||||||
|
|||||||
Reference in New Issue
Block a user