File size: 2,228 Bytes
04da94d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
REM =====================================================

REM USAR PYTHON EMBEDDED DO COMFYUI (CUDA 12.8)

REM =====================================================

cd /d D:\ComfyUI_windows_portable_nvidia_cu128\ComfyUI_windows_portable



REM -----------------------------------------------------

REM ATIVAR PYTHON EMBEDDED

REM -----------------------------------------------------
set PYTHON=python_embeded\python.exe
set PIP=python_embeded\python.exe -m pip



REM -----------------------------------------------------

REM ATUALIZAR FERRAMENTAS BASE

REM -----------------------------------------------------
%PYTHON% -m ensurepip
%PIP% install --upgrade pip setuptools wheel



REM -----------------------------------------------------

REM LIMPAR PACOTES QUE CAUSAM DLL ERROR

REM -----------------------------------------------------
%PIP% uninstall -y torch torchvision torchaudio diffusers xformers accelerate safetensors



REM -----------------------------------------------------

REM INSTALAR PYTORCH COMPATÍVEL COM CUDA 12.8

REM -----------------------------------------------------
%PIP% install torch==2.3.1+cu121 torchvision==0.18.1+cu121 torchaudio==2.3.1+cu121 --index-url https://download.pytorch.org/whl/cu121



REM -----------------------------------------------------

REM INSTALAR DEPENDÊNCIAS EXATAS PARA VIDEOMAMA

REM -----------------------------------------------------
%PIP% install diffusers==0.24.0
%PIP% install accelerate==0.25.0
%PIP% install safetensors==0.4.2
%PIP% install transformers==4.36.2
%PIP% install huggingface_hub==0.20.3
%PIP% install einops numpy pillow tqdm scipy packaging



REM -----------------------------------------------------

REM XFORMERS COMPATÍVEL

REM -----------------------------------------------------
%PIP% install xformers==0.0.26.post1



REM -----------------------------------------------------

REM TESTE FINAL (CRÍTICO)

REM -----------------------------------------------------
%PYTHON% - << EOF
import torch
from diffusers.models.autoencoders import autoencoder_kl_temporal_decoder
print("Torch:", torch.__version__)
print("CUDA:", torch.cuda.is_available())
print("OK: autoencoder_kl_temporal_decoder carregado")
EOF