Skip to content

Commit f0aa9b9

Browse files
committed
make style && make quality;
1 parent 2bd4b9c commit f0aa9b9

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

scripts/convert_sana_to_diffusers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import torch
99
from accelerate import init_empty_weights
10+
from huggingface_hub import hf_hub_download, snapshot_download
1011
from termcolor import colored
1112
from transformers import AutoModelForCausalLM, AutoTokenizer
1213

@@ -19,7 +20,7 @@
1920
)
2021
from diffusers.models.modeling_utils import load_model_dict_into_meta
2122
from diffusers.utils.import_utils import is_accelerate_available
22-
from huggingface_hub import hf_hub_download, snapshot_download
23+
2324

2425
CTX = init_empty_weights if is_accelerate_available else nullcontext
2526

src/diffusers/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,8 +806,8 @@
806806
PixArtSigmaPAGPipeline,
807807
PixArtSigmaPipeline,
808808
ReduxImageEncoder,
809-
SanaPipeline,
810809
SanaPAGPipeline,
810+
SanaPipeline,
811811
SemanticStableDiffusionPipeline,
812812
ShapEImg2ImgPipeline,
813813
ShapEPipeline,

src/diffusers/models/transformers/sana_transformer.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
import numbers
1514
from typing import Any, Dict, Optional, Union
1615

1716
import torch
@@ -24,10 +23,7 @@
2423
Attention,
2524
AttentionProcessor,
2625
AttnProcessor2_0,
27-
FusedAttnProcessor2_0,
2826
SanaLinearAttnProcessor2_0,
29-
SanaMultiscaleAttnProcessor2_0,
30-
SanaMultiscaleLinearAttention,
3127
)
3228
from ..embeddings import PatchEmbed, PixArtAlphaTextProjection, SinusoidalPositionalEmbedding
3329
from ..modeling_outputs import Transformer2DModelOutput
@@ -491,7 +487,7 @@ def forward(
491487
return_dict: bool = True,
492488
):
493489
"""
494-
The [`PixArtTransformer2DModel`] forward method.
490+
The [`SanaTransformer2DModel`] forward method.
495491
496492
Args:
497493
hidden_states (`torch.FloatTensor` of shape `(batch size, channel, height, width)`):

src/diffusers/pipelines/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,8 +592,8 @@
592592
HunyuanDiTPAGPipeline,
593593
KolorsPAGPipeline,
594594
PixArtSigmaPAGPipeline,
595-
StableDiffusion3PAGImg2ImgPipeline,
596595
SanaPAGPipeline,
596+
StableDiffusion3PAGImg2ImgPipeline,
597597
StableDiffusion3PAGPipeline,
598598
StableDiffusionControlNetPAGInpaintPipeline,
599599
StableDiffusionControlNetPAGPipeline,

0 commit comments

Comments
 (0)