Upload folder using huggingface_hub
Browse files- app.py +0 -8
- core/pipelines/workflow_recipes/_partials/conditioning/hidream.yaml +0 -53
- requirements.txt +5 -21
- scripts/__init__.py +0 -0
- scripts/build_sage_attention.py +0 -57
app.py
CHANGED
|
@@ -46,17 +46,9 @@ def dummy_gpu_for_startup():
|
|
| 46 |
|
| 47 |
|
| 48 |
def main():
|
| 49 |
-
from scripts import build_sage_attention
|
| 50 |
from comfy_integration import setup as setup_comfyui
|
| 51 |
from utils.app_utils import load_ipadapter_presets
|
| 52 |
|
| 53 |
-
print("--- [Setup] Attempting to build and install SageAttention... ---")
|
| 54 |
-
try:
|
| 55 |
-
build_sage_attention.install_sage_attention()
|
| 56 |
-
print("--- [Setup] β
SageAttention installation process finished. ---")
|
| 57 |
-
except Exception as e:
|
| 58 |
-
print(f"--- [Setup] β SageAttention installation failed: {e}. Continuing with default attention. ---")
|
| 59 |
-
|
| 60 |
print("--- [Setup] Starting ComfyUI initialization ---")
|
| 61 |
setup_comfyui.initialize_comfyui()
|
| 62 |
|
|
|
|
| 46 |
|
| 47 |
|
| 48 |
def main():
|
|
|
|
| 49 |
from comfy_integration import setup as setup_comfyui
|
| 50 |
from utils.app_utils import load_ipadapter_presets
|
| 51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
print("--- [Setup] Starting ComfyUI initialization ---")
|
| 53 |
setup_comfyui.initialize_comfyui()
|
| 54 |
|
core/pipelines/workflow_recipes/_partials/conditioning/hidream.yaml
DELETED
|
@@ -1,53 +0,0 @@
|
|
| 1 |
-
nodes:
|
| 2 |
-
unet_loader:
|
| 3 |
-
class_type: UNETLoader
|
| 4 |
-
title: "Load HiDream UNET"
|
| 5 |
-
params:
|
| 6 |
-
weight_dtype: "default"
|
| 7 |
-
vae_loader:
|
| 8 |
-
class_type: VAELoader
|
| 9 |
-
title: "Load HiDream VAE"
|
| 10 |
-
clip_loader:
|
| 11 |
-
class_type: QuadrupleCLIPLoader
|
| 12 |
-
title: "Load HiDream Quadruple CLIP"
|
| 13 |
-
|
| 14 |
-
model_sampler:
|
| 15 |
-
class_type: ModelSamplingSD3
|
| 16 |
-
title: "ModelSamplingSD3"
|
| 17 |
-
params:
|
| 18 |
-
shift: 6.0
|
| 19 |
-
|
| 20 |
-
connections:
|
| 21 |
-
- from: "unet_loader:0"
|
| 22 |
-
to: "model_sampler:model"
|
| 23 |
-
|
| 24 |
-
- from: "model_sampler:0"
|
| 25 |
-
to: "ksampler:model"
|
| 26 |
-
|
| 27 |
-
- from: "clip_loader:0"
|
| 28 |
-
to: "pos_prompt:clip"
|
| 29 |
-
- from: "clip_loader:0"
|
| 30 |
-
to: "neg_prompt:clip"
|
| 31 |
-
|
| 32 |
-
- from: "pos_prompt:0"
|
| 33 |
-
to: "ksampler:positive"
|
| 34 |
-
- from: "neg_prompt:0"
|
| 35 |
-
to: "ksampler:negative"
|
| 36 |
-
|
| 37 |
-
- from: "vae_loader:0"
|
| 38 |
-
to: "vae_decode:vae"
|
| 39 |
-
- from: "vae_loader:0"
|
| 40 |
-
to: "vae_encode:vae"
|
| 41 |
-
|
| 42 |
-
dynamic_conditioning_chains:
|
| 43 |
-
conditioning_chain:
|
| 44 |
-
ksampler_node: "ksampler"
|
| 45 |
-
clip_source: "clip_loader:0"
|
| 46 |
-
|
| 47 |
-
ui_map:
|
| 48 |
-
unet_name: "unet_loader:unet_name"
|
| 49 |
-
vae_name: "vae_loader:vae_name"
|
| 50 |
-
clip1_name: "clip_loader:clip_name1"
|
| 51 |
-
clip2_name: "clip_loader:clip_name2"
|
| 52 |
-
clip3_name: "clip_loader:clip_name3"
|
| 53 |
-
clip4_name: "clip_loader:clip_name4"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requirements.txt
CHANGED
|
@@ -37,26 +37,10 @@ PyOpenGL
|
|
| 37 |
glfw
|
| 38 |
|
| 39 |
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
ftfy
|
| 43 |
-
fvcore
|
| 44 |
huggingface-hub
|
| 45 |
-
imageio
|
| 46 |
-
|
| 47 |
-
matplotlib
|
| 48 |
-
mediapipe
|
| 49 |
-
ninja
|
| 50 |
-
omegaconf
|
| 51 |
-
opencv-python>=4.7.0.72
|
| 52 |
-
python-dateutil
|
| 53 |
-
scikit-image
|
| 54 |
-
scikit-learn
|
| 55 |
-
soundfile
|
| 56 |
spaces
|
| 57 |
-
|
| 58 |
-
trimesh[easy]
|
| 59 |
-
yacs
|
| 60 |
-
yapf
|
| 61 |
-
onnxruntime-gpu
|
| 62 |
-
diffusers
|
|
|
|
| 37 |
glfw
|
| 38 |
|
| 39 |
|
| 40 |
+
diffusers
|
| 41 |
+
protobuf
|
|
|
|
|
|
|
| 42 |
huggingface-hub
|
| 43 |
+
imageio
|
| 44 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
spaces
|
| 46 |
+
sageattention @ https://huggingface.co/RioShiina/Sage-Attention-ZeroGPU-Space-Build/resolve/main/sageattention-2.2.0-cp310-cp310-linux_x86_64.whl
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scripts/__init__.py
DELETED
|
File without changes
|
scripts/build_sage_attention.py
DELETED
|
@@ -1,57 +0,0 @@
|
|
| 1 |
-
import os
|
| 2 |
-
import subprocess
|
| 3 |
-
import sys
|
| 4 |
-
import importlib.util
|
| 5 |
-
|
| 6 |
-
WHEEL_URL = "https://huggingface.co/RioShiina/Sage-Attention-ZeroGPU-Space-Build/resolve/main/sageattention-2.2.0-cp310-cp310-linux_x86_64.whl?download=true"
|
| 7 |
-
|
| 8 |
-
def run_command(command, cwd=None, env=None):
|
| 9 |
-
print(f"π Running command: {' '.join(command)}")
|
| 10 |
-
result = subprocess.run(
|
| 11 |
-
command,
|
| 12 |
-
cwd=cwd,
|
| 13 |
-
env=env,
|
| 14 |
-
stdout=subprocess.PIPE,
|
| 15 |
-
stderr=subprocess.STDOUT,
|
| 16 |
-
text=True
|
| 17 |
-
)
|
| 18 |
-
|
| 19 |
-
if result.stdout:
|
| 20 |
-
print(result.stdout)
|
| 21 |
-
|
| 22 |
-
if result.returncode != 0:
|
| 23 |
-
raise subprocess.CalledProcessError(result.returncode, command)
|
| 24 |
-
|
| 25 |
-
def is_sage_installed():
|
| 26 |
-
return importlib.util.find_spec("sageattention") is not None
|
| 27 |
-
|
| 28 |
-
def install_sage_attention():
|
| 29 |
-
package_name = "sageattention"
|
| 30 |
-
print(f"--- [SageAttention Install] Checking for {package_name} ---")
|
| 31 |
-
|
| 32 |
-
if is_sage_installed():
|
| 33 |
-
print(f"β
{package_name} package is already installed. Skipping installation.")
|
| 34 |
-
return
|
| 35 |
-
|
| 36 |
-
print(f"β³ {package_name} package not found. Starting installation from pre-built wheel.")
|
| 37 |
-
|
| 38 |
-
try:
|
| 39 |
-
print(f"--- [SageAttention Install] Installing from URL: {WHEEL_URL} ---")
|
| 40 |
-
|
| 41 |
-
pip_command = [sys.executable, "-m", "pip", "install", WHEEL_URL]
|
| 42 |
-
|
| 43 |
-
run_command(pip_command)
|
| 44 |
-
|
| 45 |
-
print("π SageAttention installed successfully from pre-built wheel! ---")
|
| 46 |
-
|
| 47 |
-
except subprocess.CalledProcessError as e:
|
| 48 |
-
print(f"β Command failed with return code: {e.returncode}")
|
| 49 |
-
print(f"β Command: {' '.join(e.cmd)}")
|
| 50 |
-
print("β SageAttention installation failed. Please check the logs above for details.")
|
| 51 |
-
raise e
|
| 52 |
-
except Exception as e:
|
| 53 |
-
print(f"β An unknown error occurred during installation: {e}")
|
| 54 |
-
raise e
|
| 55 |
-
|
| 56 |
-
if __name__ == "__main__":
|
| 57 |
-
install_sage_attention()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|