Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows support? #27

Closed
endman100 opened this issue Nov 22, 2024 · 35 comments
Closed

Windows support? #27

endman100 opened this issue Nov 22, 2024 · 35 comments

Comments

@endman100
Copy link

This is a very good project. Thank you for the team's contribution.
I would like to know if there will be Windows support without Triton?

Thanks!

@brayevalerien
Copy link

brayevalerien commented Nov 22, 2024

There are some precompiled Triton wheels for Windows here. I got Sana working on Windows when it came out, it should still be possible now.

@lawrence-cj
Copy link
Collaborator

The current inference and training code is not using Triton. You should run on your windows smoothly.

@Lyken17
Copy link
Collaborator

Lyken17 commented Nov 22, 2024

@lawrence-cj if not using, let's disable it first?

@nitinmukesh
Copy link

@endman100

If you are looking for complete guide for Windows installation
https://youtu.be/JORL_67HzJI

@lawrence-cj
Copy link
Collaborator

It would be better to check if the triton is available to import rather than disable it directly. @Lyken17

@CRCODE22
Copy link

@endman100

If you are looking for complete guide for Windows installation https://youtu.be/JORL_67HzJI

Does not work when you follow the instructions step by step.

@nitinmukesh
Copy link

@CRCODE22

What is not working. Post the error log from command prompt.

@lawrence-cj
Copy link
Collaborator

Now the project will work without xformers and triton. Please have a try.
refer to: #37 and #38

@endman100
Copy link
Author

Thanks to all comment, I pulled the latest commits, but I still couldn't execute them. So, I made some tweaks to the program myself, which might not have been the correct way to modify it, but I was able to successfully open app_sana and run the example program in Windows11.

  1. Modified Sana/diffusion/model/dc_ae/efficientvit/models/nn/triton_rms_norm.py:
    Commented out the lines "import triton" and "import triton.language as tl"
    Removed all instances of : "tl.constexpr" and "@triton.jit".
    image

  2. Created a fcntl.py file.
    Created a fcntl.py file to prevent errors caused by the absence of the fcntl module on Windows. The code is as follows:

def fcntl(fd, op, arg=0):
    return 0

def ioctl(fd, op, arg=0, mutable_flag=True):
    if mutable_flag:
        return 0
    else:
        return ""

def flock(fd, op):
    return

def lockf(fd, operation, length=0, start=0, whence=0):
    return

image

@lawrence-cj
Copy link
Collaborator

where will the fcntl module be used?

@endman100
Copy link
Author

where will the fcntl module be used?

In ./diffusion/data/wids/wids_dl.py file line 18
Windows does not come with the fcntl module by default.

@CRCODE22
Copy link

where will the fcntl module be used?

In ./diffusion/data/wids/wids_dl.py file line 18 Windows does not come with the fcntl module by default.

Yes that was one of the problems that prevented me from using Sana the fcntl once that is solved I will try using it again.

@CRCODE22
Copy link

CRCODE22 commented Nov 25, 2024

So far any attempts of using Sana under Windows 11 with a Nvidia Geforce RTX 4060 TI 16GB VRAM and 128GB System Ram have failed because of installation problems not even the so called claimed made for Windows versions of this work and I followed every installation instructions to the letter (some of the instructions are incomplete).

@Lyken17
Copy link
Collaborator

Lyken17 commented Nov 25, 2024

Seems to disable wids related module during the inference should work.

Hi @endman100 @nitinmukesh , in which step you are blocked? Installation or inferecne, if the later, can you share the inference scripts?

@FurkanGozukara
Copy link

i had to make a lot of pipeline fixes for to make it work on windows - so many only linux available libraries used

@Lyken17
Copy link
Collaborator

Lyken17 commented Nov 26, 2024

@FurkanGozukara can you share your solution and (if possible) draft PR? I agree that we may put too many linux pkgs during development and hence want to trim the dependency

@nitinmukesh
Copy link

nitinmukesh commented Nov 26, 2024

@Lyken17

I'm not blocked, I made it work within 1 hour on Windows (didn't bragged about it) and using it.

Here is the repo with all these changes
https://github.com/newgenai79/Sana_win

To fix the Linux specific issues

  1. Replace all instances of
    fcntl
    with
    portalocker

In
Sana\diffusion\data\wids\wids_dl.py
Sana\diffusion\data\wids\wids_mmtar.py

and
pip install portalocker

Please see if portalocker library is supported on Linux , replace fcntl.

In
Sana\diffusion\utils\logger.py

This code create issues
log_file = "/dev/null"

Make sure this should be taken as input from user OR defaults to log folder within project directory OR can be disabled using a switch

@CRCODE22
Copy link

@FurkanGozukara can you share your solution and (if possible) draft PR? I agree that we may put too many linux pkgs during development and hence want to trim the dependency

He will not share or contribute for free he paywalls most of his stuff money is what drives him even tough he uses so much from the open source community who do things for free he needs to make a profit out of it.

@brayevalerien
Copy link

@FurkanGozukara can you share your solution and (if possible) draft PR? I agree that we may put too many linux pkgs during development and hence want to trim the dependency

He will not share or contribute for free he paywalls most of his stuff money is what drives him even tough he uses so much from the open source community who do things for free he needs to make a profit out of it.

Seriously though. I don't even get how he isn't banned from Github and why I'm seing him even though I blocked him. He's so disrespectfull it's even more irritating that he is promoting his scamy content on Github in addition to HuggingFace and Reddit.

@nitinmukesh
Copy link

nitinmukesh commented Nov 27, 2024

@CRCODE22

Are you still struggling to make it work on Windows? I will look at it again.

@CRCODE22
Copy link

@CRCODE22

Are you still struggling to make it work on Windows? I will look at it again.

Yes I still have not managed to make it work and I follow the instructions exactly.

(sana) K:\Sana_win>python app\app_sana.py --config configs\sana_config\1024ms\Sana_1600M_img1024.yaml --model_path Efficient-Large-Model\Sana_1600M_1024px\checkpoints\Sana_1600M_1024px.pth
A matching Triton is not available, some optimizations will not be enabled
Traceback (most recent call last):
File "e:\anaconda3\envs\sana\lib\site-packages\xformers_init_.py", line 57, in is_triton_available
import triton # noqa
File "e:\anaconda3\envs\sana\lib\site-packages\triton_init
.py", line 20, in
from .runtime import (
File "e:\anaconda3\envs\sana\lib\site-packages\triton\runtime_init_.py", line 1, in
from .autotuner import (Autotuner, Config, Heuristics, autotune, heuristics)
File "e:\anaconda3\envs\sana\lib\site-packages\triton\runtime\autotuner.py", line 9, in
from ..testing import do_bench, do_bench_cudagraph
File "e:\anaconda3\envs\sana\lib\site-packages\triton\testing.py", line 7, in
from . import language as tl
File "e:\anaconda3\envs\sana\lib\site-packages\triton\language_init_.py", line 4, in
from . import math
File "e:\anaconda3\envs\sana\lib\site-packages\triton\language\math.py", line 1, in
from . import core
File "e:\anaconda3\envs\sana\lib\site-packages\triton\language\core.py", line 10, in
from ..runtime.jit import jit
File "e:\anaconda3\envs\sana\lib\site-packages\triton\runtime\jit.py", line 12, in
from ..runtime.driver import driver
File "e:\anaconda3\envs\sana\lib\site-packages\triton\runtime\driver.py", line 1, in
from ..backends import backends
File "e:\anaconda3\envs\sana\lib\site-packages\triton\backends_init_.py", line 50, in
backends = discover_backends()
File "e:\anaconda3\envs\sana\lib\site-packages\triton\backends_init
.py", line 43, in discover_backends
compiler = load_module(name, os.path.join(root, name, 'compiler.py'))
File "e:\anaconda3\envs\sana\lib\site-packages\triton\backends_init
.py", line 12, in load_module
spec.loader.exec_module(module)
File "e:\anaconda3\envs\sana\lib\site-packages\triton\backends\amd\compiler.py", line 2, in
from triton.C.libtriton import ir, passes, llvm, amd
ImportError: DLL load failed while importing libtriton: A dynamic link library (DLL) initialization routine failed.
Traceback (most recent call last):
File "K:\Sana_win\app\app_sana.py", line 34, in
from app.sana_pipeline import SanaPipeline
File "e:\anaconda3\envs\sana\lib\site-packages\app\sana_pipeline.py", line 28, in
from diffusion import DPMS, FlowEuler
File "e:\anaconda3\envs\sana\lib\site-packages\diffusion_init
.py", line 6, in
from .dpm_solver import DPMS
File "e:\anaconda3\envs\sana\lib\site-packages\diffusion\dpm_solver.py", line 19, in
from .model import gaussian_diffusion as gd
File "e:\anaconda3\envs\sana\lib\site-packages\diffusion\model_init
.py", line 1, in
from .nets import *
File "e:\anaconda3\envs\sana\lib\site-packages\diffusion\model\nets_init.py", line 1, in
from .sana import *
File "e:\anaconda3\envs\sana\lib\site-packages\diffusion\model\nets\sana.py", line 25, in
from diffusion.model.builder import MODELS
File "e:\anaconda3\envs\sana\lib\site-packages\diffusion\model\builder.py", line 24, in
from diffusion.model.dc_ae.efficientvit.ae_model_zoo import DCAE_HF
File "e:\anaconda3\envs\sana\lib\site-packages\diffusion\model\dc_ae\efficientvit\ae_model_zoo.py", line 24, in
from ..efficientvit.models.efficientvit.dc_ae import DCAE, DCAEConfig, dc_ae_f32c32, dc_ae_f64c128, dc_ae_f128c512
File "e:\anaconda3\envs\sana\lib\site-packages\diffusion\model\dc_ae\efficientvit\models\efficientvit_init_.py", line 1, in
from .dc_ae import *
File "e:\anaconda3\envs\sana\lib\site-packages\diffusion\model\dc_ae\efficientvit\models\efficientvit\dc_ae.py", line 25, in
from ...models.nn.act import build_act
File "e:\anaconda3\envs\sana\lib\site-packages\diffusion\model\dc_ae\efficientvit\models\nn_init_.py", line 2, in
from .drop import *
File "e:\anaconda3\envs\sana\lib\site-packages\diffusion\model\dc_ae\efficientvit\models\nn\drop.py", line 24, in
from ...models.nn.ops import IdentityLayer, ResidualBlock
File "e:\anaconda3\envs\sana\lib\site-packages\diffusion\model\dc_ae\efficientvit\models\nn\ops.py", line 24, in
from ...models.nn.norm import build_norm
File "e:\anaconda3\envs\sana\lib\site-packages\diffusion\model\dc_ae\efficientvit\models\nn\norm.py", line 23, in
from ...models.nn.triton_rms_norm import TritonRMSNorm2dFunc
File "e:\anaconda3\envs\sana\lib\site-packages\diffusion\model\dc_ae\efficientvit\models\nn\triton_rms_norm.py", line 18, in
import triton
File "e:\anaconda3\envs\sana\lib\site-packages\triton_init_.py", line 20, in
from .runtime import (
File "e:\anaconda3\envs\sana\lib\site-packages\triton\runtime_init_.py", line 1, in
from .autotuner import (Autotuner, Config, Heuristics, autotune, heuristics)
File "e:\anaconda3\envs\sana\lib\site-packages\triton\runtime\autotuner.py", line 9, in
from ..testing import do_bench, do_bench_cudagraph
File "e:\anaconda3\envs\sana\lib\site-packages\triton\testing.py", line 7, in
from . import language as tl
File "e:\anaconda3\envs\sana\lib\site-packages\triton\language_init_.py", line 4, in
from . import math
File "e:\anaconda3\envs\sana\lib\site-packages\triton\language\math.py", line 1, in
from . import core
File "e:\anaconda3\envs\sana\lib\site-packages\triton\language\core.py", line 10, in
from ..runtime.jit import jit
File "e:\anaconda3\envs\sana\lib\site-packages\triton\runtime\jit.py", line 12, in
from ..runtime.driver import driver
File "e:\anaconda3\envs\sana\lib\site-packages\triton\runtime\driver.py", line 1, in
from ..backends import backends
File "e:\anaconda3\envs\sana\lib\site-packages\triton\backends_init_.py", line 50, in
backends = discover_backends()
File "e:\anaconda3\envs\sana\lib\site-packages\triton\backends_init
.py", line 43, in _discover_backends
compiler = load_module(name, os.path.join(root, name, 'compiler.py'))
File "e:\anaconda3\envs\sana\lib\site-packages\triton\backends_init
.py", line 12, in _load_module
spec.loader.exec_module(module)
File "e:\anaconda3\envs\sana\lib\site-packages\triton\backends\amd\compiler.py", line 2, in
from triton._C.libtriton import ir, passes, llvm, amd
ImportError: DLL load failed while importing libtriton: A dynamic link library (DLL) initialization routine failed.

@lawrence-cj
Copy link
Collaborator

lawrence-cj commented Nov 28, 2024

pull the latest code and maybe you can try to uninstall triton if the latest code still not work for you.

@CRCODE22
Copy link

pull the latest code and maybe you can try to uninstall triton if the latest code still not work for you.

I tried does not work:

git clone https://github.com/NVlabs/Sana.git
conda create -n sana python=3.10.0 -y
conda activate sana
conda install -c nvidia cuda-toolkit -y
python -m pip install -U pip
pip install -U xformers==0.0.27.post2 --index-url https://download.pytorch.org/whl/cu121
pip install -e .
ERROR: Could not find a version that satisfies the requirement triton==3.0.0 (from sana) (from versions: none)
ERROR: No matching distribution found for triton==3.0.0

@CRCODE22
Copy link

Trying to run the software anyways will give more dependencies that are not installed.

(sana) K:\Sana>python app\app_sana.py --config configs\sana_config\1024ms\Sana_1600M_img1024.yaml --model_path Efficient-Large-Model\Sana_1600M_1024px\checkpoints\Sana_1600M_1024px.pth
Traceback (most recent call last):
File "K:\Sana\app\app_sana.py", line 28, in
import gradio as gr
ModuleNotFoundError: No module named 'gradio'

@CRCODE22
Copy link

@lawrence-cj It should not be this difficult for you to make a working version for Windows?

@CRCODE22
Copy link

CRCODE22 commented Nov 28, 2024

@nitinmukesh your installation of Sana for Windows also does not work similar problems.

@CRCODE22
Copy link

It does not look like anymore this model is even worth spending all that time on getting to work after days it still does not. Their devs clearly do not even know how to get it running on Windows 11.

pip install gradio

(sana) K:\Sana>python app\app_sana.py --config configs\sana_config\1024ms\Sana_1600M_img1024.yaml --model_path Efficient-Large-Model\Sana_1600M_1024px\checkpoints\Sana_1600M_1024px.pth
Traceback (most recent call last):
File "K:\Sana\app\app_sana.py", line 30, in
import spaces
ModuleNotFoundError: No module named 'spaces'

(sana) K:\Sana>pip install spaces

(sana) K:\Sana>python app\app_sana.py --config configs\sana_config\1024ms\Sana_1600M_img1024.yaml --model_path Efficient-Large-Model\Sana_1600M_1024px\checkpoints\Sana_1600M_1024px.pth
Traceback (most recent call last):
File "K:\Sana\app\app_sana.py", line 33, in
from torchvision.utils import make_grid, save_image
ModuleNotFoundError: No module named 'torchvision'

(sana) K:\Sana>pip install torchvision

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
xformers 0.0.27.post2 requires torch==2.4.0, but you have torch 2.5.1 which is incompatible.
Successfully installed torch-2.5.1 torchvision-0.20.1

@FurkanGozukara
Copy link

FurkanGozukara commented Nov 28, 2024

for who cant solve how to install i have 1 click installer that works

all you need is having installed python 3.10.11, cuda 12.x, c++ tools - public post : https://www.patreon.com/posts/nvidia-labs-sana-116531341

requirements tutorial that shows everything step by step (python, cuda, c++ tools, cudnn) : https://youtu.be/DrhUHnYfwC0

I spent 12 hours to make this installer + the improved gradio

01 (1)

@lawrence-cj
Copy link
Collaborator

ERROR: Could not find a version that satisfies the requirement triton==3.0.0 (from sana) (from versions: none)
ERROR: No matching distribution found for triton==3.0.0

The error stops the process of installing other dependencies, like I like remove the triton related part, like:

"triton==3.0.0",

And I'll try to remove the dependency of triton later when I'm free. The bandwidth is full. @CRCODE22

@newgenai79
Copy link

No module named 'gradio'

pip install gradio

@CRCODE22
Copy link

ERROR: Could not find a version that satisfies the requirement triton==3.0.0 (from sana) (from versions: none)
ERROR: No matching distribution found for triton==3.0.0

The error stops the process of installing other dependencies, like I like remove the triton related part, like:

"triton==3.0.0",

And I'll try to remove the dependency of triton later when I'm free. The bandwidth is full. @CRCODE22

Ok it would really if you can remove the dependency of triton do I still need to install xformers?

@CRCODE22
Copy link

CRCODE22 commented Nov 29, 2024

No module named 'gradio'

pip install gradio

If it where only that simple once you have installed that as I mentioned and shown in my earlier post it will keep asking for other dependencies that should go automatic. I will first try to remove that line 44 as @lawrence-cj suggested and see if dependencies are automatically installed.

@CRCODE22
Copy link

@lawrence-cj I did a reinstall and removed the line 44 related to triton on Sana/pyproject.toml](

"triton==3.0.0",
)

(sana) K:\Sana>python app\app_sana.py --config configs\sana_config\1024ms\Sana_1600M_img1024.yaml --model_path Efficient-Large-Model\Sana_1600M_1024px\checkpoints\Sana_1600M_1024px.pth
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
PyTorch 2.4.0+cu121 with CUDA 1201 (you have 2.4.0+cpu)
Python 3.10.11 (you have 3.10.15)
Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
Memory-efficient attention, SwiGLU, sparse and more won't be available.
Set XFORMERS_MORE_DETAILS=1 for more details
Traceback (most recent call last):
File "K:\Sana\app\app_sana.py", line 37, in
from app.sana_pipeline import SanaPipeline
File "K:\Sana\app\sana_pipeline.py", line 28, in
from diffusion import DPMS, FlowEuler
File "K:\Sana\diffusion_init_.py", line 6, in
from .dpm_solver import DPMS
File "K:\Sana\diffusion\dpm_solver.py", line 20, in
from .model.dpm_solver import DPM_Solver, NoiseScheduleFlow, NoiseScheduleVP, model_wrapper
File "K:\Sana\diffusion\model\dpm_solver.py", line 23, in
from .nets.sana_blocks import (
File "K:\Sana\diffusion\model\nets_init_.py", line 1, in
from .sana import (
File "K:\Sana\diffusion\model\nets\sana.py", line 25, in
from diffusion.model.builder import MODELS
File "K:\Sana\diffusion\model\builder.py", line 24, in
from diffusion.model.dc_ae.efficientvit.ae_model_zoo import DCAE_HF
File "K:\Sana\diffusion\model\dc_ae\efficientvit\ae_model_zoo.py", line 24, in
from ..efficientvit.models.efficientvit.dc_ae import DCAE, DCAEConfig, dc_ae_f32c32, dc_ae_f64c128, dc_ae_f128c512
File "K:\Sana\diffusion\model\dc_ae\efficientvit\models\efficientvit_init_.py", line 1, in
from .dc_ae import *
File "K:\Sana\diffusion\model\dc_ae\efficientvit\models\efficientvit\dc_ae.py", line 25, in
from ...models.nn.act import build_act
File "K:\Sana\diffusion\model\dc_ae\efficientvit\models\nn_init_.py", line 2, in
from .drop import *
File "K:\Sana\diffusion\model\dc_ae\efficientvit\models\nn\drop.py", line 24, in
from ...models.nn.ops import IdentityLayer, ResidualBlock
File "K:\Sana\diffusion\model\dc_ae\efficientvit\models\nn\ops.py", line 24, in
from ...models.nn.norm import build_norm
File "K:\Sana\diffusion\model\dc_ae\efficientvit\models\nn\norm.py", line 23, in
from ...models.nn.triton_rms_norm import TritonRMSNorm2dFunc
File "K:\Sana\diffusion\model\dc_ae\efficientvit\models\nn\triton_rms_norm.py", line 18, in
import triton
ModuleNotFoundError: No module named 'triton'

(sana) K:\Sana>pip install -U xformers==0.0.27.post2 --index-url https://download.pytorch.org/whl/cu121
Looking in indexes: https://download.pytorch.org/whl/cu121, https://pypi.ngc.nvidia.com
Requirement already satisfied: xformers==0.0.27.post2 in e:\anaconda3\envs\sana\lib\site-packages (0.0.27.post2)
Requirement already satisfied: numpy in e:\anaconda3\envs\sana\lib\site-packages (from xformers==0.0.27.post2) (1.26.3)
Requirement already satisfied: torch==2.4.0 in e:\anaconda3\envs\sana\lib\site-packages (from xformers==0.0.27.post2) (2.4.0)
Requirement already satisfied: filelock in e:\anaconda3\envs\sana\lib\site-packages (from torch==2.4.0->xformers==0.0.27.post2) (3.13.1)
Requirement already satisfied: typing-extensions>=4.8.0 in e:\anaconda3\envs\sana\lib\site-packages (from torch==2.4.0->xformers==0.0.27.post2) (4.12.2)
Requirement already satisfied: sympy in e:\anaconda3\envs\sana\lib\site-packages (from torch==2.4.0->xformers==0.0.27.post2) (1.13.1)
Requirement already satisfied: networkx in e:\anaconda3\envs\sana\lib\site-packages (from torch==2.4.0->xformers==0.0.27.post2) (3.2.1)
Requirement already satisfied: jinja2 in e:\anaconda3\envs\sana\lib\site-packages (from torch==2.4.0->xformers==0.0.27.post2) (3.1.3)
Requirement already satisfied: fsspec in e:\anaconda3\envs\sana\lib\site-packages (from torch==2.4.0->xformers==0.0.27.post2) (2024.2.0)
Requirement already satisfied: MarkupSafe>=2.0 in e:\anaconda3\envs\sana\lib\site-packages (from jinja2->torch==2.4.0->xformers==0.0.27.post2) (2.1.5)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in e:\anaconda3\envs\sana\lib\site-packages (from sympy->torch==2.4.0->xformers==0.0.27.post2) (1.3.0)

(sana) K:\Sana>python app\app_sana.py --config configs\sana_config\1024ms\Sana_1600M_img1024.yaml --model_path Efficient-Large-Model\Sana_1600M_1024px\checkpoints\Sana_1600M_1024px.pth
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
PyTorch 2.4.0+cu121 with CUDA 1201 (you have 2.4.0+cpu)
Python 3.10.11 (you have 3.10.15)
Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
Memory-efficient attention, SwiGLU, sparse and more won't be available.
Set XFORMERS_MORE_DETAILS=1 for more details
Traceback (most recent call last):
File "K:\Sana\app\app_sana.py", line 37, in
from app.sana_pipeline import SanaPipeline
File "K:\Sana\app\sana_pipeline.py", line 28, in
from diffusion import DPMS, FlowEuler
File "K:\Sana\diffusion_init_.py", line 6, in
from .dpm_solver import DPMS
File "K:\Sana\diffusion\dpm_solver.py", line 20, in
from .model.dpm_solver import DPM_Solver, NoiseScheduleFlow, NoiseScheduleVP, model_wrapper
File "K:\Sana\diffusion\model\dpm_solver.py", line 23, in
from .nets.sana_blocks import (
File "K:\Sana\diffusion\model\nets_init_.py", line 1, in
from .sana import (
File "K:\Sana\diffusion\model\nets\sana.py", line 25, in
from diffusion.model.builder import MODELS
File "K:\Sana\diffusion\model\builder.py", line 24, in
from diffusion.model.dc_ae.efficientvit.ae_model_zoo import DCAE_HF
File "K:\Sana\diffusion\model\dc_ae\efficientvit\ae_model_zoo.py", line 24, in
from ..efficientvit.models.efficientvit.dc_ae import DCAE, DCAEConfig, dc_ae_f32c32, dc_ae_f64c128, dc_ae_f128c512
File "K:\Sana\diffusion\model\dc_ae\efficientvit\models\efficientvit_init_.py", line 1, in
from .dc_ae import *
File "K:\Sana\diffusion\model\dc_ae\efficientvit\models\efficientvit\dc_ae.py", line 25, in
from ...models.nn.act import build_act
File "K:\Sana\diffusion\model\dc_ae\efficientvit\models\nn_init_.py", line 2, in
from .drop import *
File "K:\Sana\diffusion\model\dc_ae\efficientvit\models\nn\drop.py", line 24, in
from ...models.nn.ops import IdentityLayer, ResidualBlock
File "K:\Sana\diffusion\model\dc_ae\efficientvit\models\nn\ops.py", line 24, in
from ...models.nn.norm import build_norm
File "K:\Sana\diffusion\model\dc_ae\efficientvit\models\nn\norm.py", line 23, in
from ...models.nn.triton_rms_norm import TritonRMSNorm2dFunc
File "K:\Sana\diffusion\model\dc_ae\efficientvit\models\nn\triton_rms_norm.py", line 18, in
import triton
ModuleNotFoundError: No module named 'triton'

@CRCODE22
Copy link

I solved most of the problems but the triton requirement is still hard coded it seems and prevents Sana from working on Windows 11

(sana) K:\Sana>python app\app_sana.py --config configs\sana_config\1024ms\Sana_1600M_img1024.yaml --model_path Efficient-Large-Model\Sana_1600M_1024px\checkpoints\Sana_1600M_1024px.pth
A matching Triton is not available, some optimizations will not be enabled
Traceback (most recent call last):
File "e:\anaconda3\envs\sana\lib\site-packages\xformers_init_.py", line 57, in is_triton_available
import triton # noqa
ModuleNotFoundError: No module named 'triton'
Traceback (most recent call last):
File "K:\Sana\app\app_sana.py", line 37, in
from app.sana_pipeline import SanaPipeline
File "K:\Sana\app\sana_pipeline.py", line 28, in
from diffusion import DPMS, FlowEuler
File "K:\Sana\diffusion_init
.py", line 6, in
from .dpm_solver import DPMS
File "K:\Sana\diffusion\dpm_solver.py", line 20, in
from .model.dpm_solver import DPM_Solver, NoiseScheduleFlow, NoiseScheduleVP, model_wrapper
File "K:\Sana\diffusion\model\dpm_solver.py", line 23, in
from .nets.sana_blocks import (
File "K:\Sana\diffusion\model\nets_init_.py", line 1, in
from .sana import (
File "K:\Sana\diffusion\model\nets\sana.py", line 25, in
from diffusion.model.builder import MODELS
File "K:\Sana\diffusion\model\builder.py", line 24, in
from diffusion.model.dc_ae.efficientvit.ae_model_zoo import DCAE_HF
File "K:\Sana\diffusion\model\dc_ae\efficientvit\ae_model_zoo.py", line 24, in
from ..efficientvit.models.efficientvit.dc_ae import DCAE, DCAEConfig, dc_ae_f32c32, dc_ae_f64c128, dc_ae_f128c512
File "K:\Sana\diffusion\model\dc_ae\efficientvit\models\efficientvit_init_.py", line 1, in
from .dc_ae import *
File "K:\Sana\diffusion\model\dc_ae\efficientvit\models\efficientvit\dc_ae.py", line 25, in
from ...models.nn.act import build_act
File "K:\Sana\diffusion\model\dc_ae\efficientvit\models\nn_init_.py", line 2, in
from .drop import *
File "K:\Sana\diffusion\model\dc_ae\efficientvit\models\nn\drop.py", line 24, in
from ...models.nn.ops import IdentityLayer, ResidualBlock
File "K:\Sana\diffusion\model\dc_ae\efficientvit\models\nn\ops.py", line 24, in
from ...models.nn.norm import build_norm
File "K:\Sana\diffusion\model\dc_ae\efficientvit\models\nn\norm.py", line 23, in
from ...models.nn.triton_rms_norm import TritonRMSNorm2dFunc
File "K:\Sana\diffusion\model\dc_ae\efficientvit\models\nn\triton_rms_norm.py", line 18, in
import triton
ModuleNotFoundError: No module named 'triton'

@yujincheng08
Copy link
Collaborator

#80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants