webtools-cli 1.3.5__tar.gz → 1.3.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. {webtools_cli-1.3.5 → webtools_cli-1.3.7}/ComfyUI/comfyu.py +18 -11
  2. {webtools_cli-1.3.5 → webtools_cli-1.3.7}/ComfyUI/ui.py +17 -0
  3. {webtools_cli-1.3.5/webtools_cli.egg-info → webtools_cli-1.3.7}/PKG-INFO +1 -1
  4. {webtools_cli-1.3.5 → webtools_cli-1.3.7}/pyproject.toml +1 -1
  5. {webtools_cli-1.3.5 → webtools_cli-1.3.7}/webtools/core.py +115 -26
  6. {webtools_cli-1.3.5 → webtools_cli-1.3.7/webtools_cli.egg-info}/PKG-INFO +1 -1
  7. {webtools_cli-1.3.5 → webtools_cli-1.3.7}/ComfyUI/comfyUI.py +0 -0
  8. {webtools_cli-1.3.5 → webtools_cli-1.3.7}/LICENSE +0 -0
  9. {webtools_cli-1.3.5 → webtools_cli-1.3.7}/README.md +0 -0
  10. {webtools_cli-1.3.5 → webtools_cli-1.3.7}/setup.cfg +0 -0
  11. {webtools_cli-1.3.5 → webtools_cli-1.3.7}/webtools/__init__.py +0 -0
  12. {webtools_cli-1.3.5 → webtools_cli-1.3.7}/webtools/__main__.py +0 -0
  13. {webtools_cli-1.3.5 → webtools_cli-1.3.7}/webtools/cli.py +0 -0
  14. {webtools_cli-1.3.5 → webtools_cli-1.3.7}/webtools/install.py +0 -0
  15. {webtools_cli-1.3.5 → webtools_cli-1.3.7}/webtools/mega_client.py +0 -0
  16. {webtools_cli-1.3.5 → webtools_cli-1.3.7}/webtools/web/index.html +0 -0
  17. {webtools_cli-1.3.5 → webtools_cli-1.3.7}/webtools/web/script.js +0 -0
  18. {webtools_cli-1.3.5 → webtools_cli-1.3.7}/webtools/web/style.css +0 -0
  19. {webtools_cli-1.3.5 → webtools_cli-1.3.7}/webtools_cli.egg-info/SOURCES.txt +0 -0
  20. {webtools_cli-1.3.5 → webtools_cli-1.3.7}/webtools_cli.egg-info/dependency_links.txt +0 -0
  21. {webtools_cli-1.3.5 → webtools_cli-1.3.7}/webtools_cli.egg-info/entry_points.txt +0 -0
  22. {webtools_cli-1.3.5 → webtools_cli-1.3.7}/webtools_cli.egg-info/requires.txt +0 -0
  23. {webtools_cli-1.3.5 → webtools_cli-1.3.7}/webtools_cli.egg-info/top_level.txt +0 -0
@@ -10,26 +10,31 @@ WORKSPACE = os.environ.get("COMFYUI_WORKSPACE", "/content/ComfyUI")
10
10
  CHECKPOINT_URLS = os.environ.get("CHECKPOINT_URLS", "")
11
11
  UNET_DIFFUSION_URLS = os.environ.get("UNET_DIFFUSION_URLS", "")
12
12
  TEXT_ENCODER_URLS = os.environ.get("TEXT_ENCODER_URLS", "")
13
+ TEXT_ENCODERS_URLS = os.environ.get("TEXT_ENCODERS_URLS", "")
13
14
  CLIP_VISION_URLS = os.environ.get("CLIP_VISION_URLS", "")
14
15
  VAE_URLS = os.environ.get("VAE_URLS", "")
15
16
  LORA_URLS = os.environ.get("LORA_URLS", "")
16
17
  CONTROLNET_URLS = os.environ.get("CONTROLNET_URLS", "")
17
18
  UPSCALE_MODELS_URLS = os.environ.get("UPSCALE_MODELS_URLS", "")
19
+ LATENT_UPSCALE_URLS = os.environ.get("LATENT_UPSCALE_URLS", "")
18
20
  EMBEDDING_URLS = os.environ.get("EMBEDDING_URLS", "")
19
21
  CUSTOM_NODE_URLS = os.environ.get("CUSTOM_NODE_URLS", "")
20
22
 
21
23
  # --- Downloader Logic ---
22
24
  DIRS = {
23
- "checkpoints": os.path.join(WORKSPACE, "models/checkpoints"),
24
- "unet": os.path.join(WORKSPACE, "models/unet"),
25
- "clip": os.path.join(WORKSPACE, "models/clip"),
26
- "clip_vision": os.path.join(WORKSPACE, "models/clip_vision"),
27
- "vae": os.path.join(WORKSPACE, "models/vae"),
28
- "loras": os.path.join(WORKSPACE, "models/loras"),
29
- "controlnet": os.path.join(WORKSPACE, "models/controlnet"),
30
- "upscale_models": os.path.join(WORKSPACE, "models/upscale_models"),
31
- "embeddings": os.path.join(WORKSPACE, "models/embeddings"),
32
- "custom_nodes": os.path.join(WORKSPACE, "custom_nodes")
25
+ "checkpoints": os.path.join(WORKSPACE, "models/checkpoints"),
26
+ "unet": os.path.join(WORKSPACE, "models/unet"),
27
+ "diffusion_models": os.path.join(WORKSPACE, "models/diffusion_models"),
28
+ "clip": os.path.join(WORKSPACE, "models/clip"),
29
+ "text_encoders": os.path.join(WORKSPACE, "models/text_encoders"),
30
+ "clip_vision": os.path.join(WORKSPACE, "models/clip_vision"),
31
+ "vae": os.path.join(WORKSPACE, "models/vae"),
32
+ "loras": os.path.join(WORKSPACE, "models/loras"),
33
+ "controlnet": os.path.join(WORKSPACE, "models/controlnet"),
34
+ "upscale_models": os.path.join(WORKSPACE, "models/upscale_models"),
35
+ "latent_upscale": os.path.join(WORKSPACE, "models/latent_upscale_models"),
36
+ "embeddings": os.path.join(WORKSPACE, "models/embeddings"),
37
+ "custom_nodes": os.path.join(WORKSPACE, "custom_nodes")
33
38
  }
34
39
 
35
40
  def get_filename(url, response):
@@ -107,13 +112,15 @@ def process_downloads(urls_str, target_dir, is_node=False):
107
112
  if __name__ == "__main__":
108
113
  # --- Execution ---
109
114
  process_downloads(CHECKPOINT_URLS, DIRS["checkpoints"])
110
- process_downloads(UNET_DIFFUSION_URLS, DIRS["unet"])
115
+ process_downloads(UNET_DIFFUSION_URLS, DIRS["diffusion_models"])
111
116
  process_downloads(TEXT_ENCODER_URLS, DIRS["clip"])
117
+ process_downloads(TEXT_ENCODERS_URLS, DIRS["text_encoders"])
112
118
  process_downloads(CLIP_VISION_URLS, DIRS["clip_vision"])
113
119
  process_downloads(VAE_URLS, DIRS["vae"])
114
120
  process_downloads(LORA_URLS, DIRS["loras"])
115
121
  process_downloads(CONTROLNET_URLS, DIRS["controlnet"])
116
122
  process_downloads(UPSCALE_MODELS_URLS, DIRS["upscale_models"])
123
+ process_downloads(LATENT_UPSCALE_URLS, DIRS["latent_upscale"])
117
124
  process_downloads(EMBEDDING_URLS, DIRS["embeddings"])
118
125
  process_downloads(CUSTOM_NODE_URLS, DIRS["custom_nodes"], is_node=True)
119
126
 
@@ -14,6 +14,12 @@ MEMORY_PROFILE = "Standard (Auto-Detect)" #@param ["Standard (Auto-Detect)", "Lo
14
14
  #@markdown **Visual Settings:**
15
15
  LIVE_GENERATION_PREVIEWS = True #@param {type:"boolean"}
16
16
 
17
+ # --- Session Configuration ---
18
+ #@markdown **Performance Profile:**
19
+ MEMORY_PROFILE = "Standard (Auto-Detect)" #@param ["Standard (Auto-Detect)", "Low VRAM (T4 GPU / Heavy Models)", "High VRAM (A100 GPU Only)"]
20
+ #@markdown **Visual Settings:**
21
+ LIVE_GENERATION_PREVIEWS = True #@param {type:"boolean"}
22
+
17
23
  # Dynamic Workspace detection
18
24
  WORKSPACE = os.environ.get("COMFYUI_WORKSPACE")
19
25
  if not WORKSPACE:
@@ -29,6 +35,17 @@ if not WORKSPACE:
29
35
 
30
36
  ARGS = []
31
37
 
38
+ # GPU Detection & Fallback
39
+ try:
40
+ import torch
41
+ if not torch.cuda.is_available():
42
+ print("[WARNING] NVIDIA GPU not detected by Torch. Switching to CPU mode...")
43
+ ARGS.append("--cpu")
44
+ except ImportError:
45
+ # If torch is not even installed yet (unlikely on Colab), we'll assume CPU for now
46
+ # or let the main.py handle its own errors. But adding --cpu is safer.
47
+ ARGS.append("--cpu")
48
+
32
49
  if "Low VRAM" in MEMORY_PROFILE:
33
50
  ARGS.append("--lowvram")
34
51
  elif "High VRAM" in MEMORY_PROFILE:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: webtools-cli
3
- Version: 1.3.5
3
+ Version: 1.3.7
4
4
  Summary: Advanced Web Intelligence & Scraping Toolkit with CLI and Web UI
5
5
  Author: Abhinav Adarsh
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "webtools-cli"
7
- version = "1.3.5"
7
+ version = "1.3.7"
8
8
  description = "Advanced Web Intelligence & Scraping Toolkit with CLI and Web UI"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -3545,6 +3545,7 @@ def run_comfyui_mode():
3545
3545
  print(f"\n{Fore.CYAN}--- ComfyUI Launcher ---{Style.RESET_ALL}")
3546
3546
  print(f" {Fore.CYAN}[1]{Style.RESET_ALL} Launch Standard ComfyUI")
3547
3547
  print(f" {Fore.CYAN}[2]{Style.RESET_ALL} Launch Anime ComfyUI (Anima Model)")
3548
+ print(f" {Fore.CYAN}[3]{Style.RESET_ALL} Launch Text-to-Video (LTX-2.3)")
3548
3549
  print(f" {Fore.RED}[b]{Style.RESET_ALL} Back to main menu")
3549
3550
 
3550
3551
  cui_choice = input(f"\n{Fore.LIGHTGREEN_EX}> {Style.RESET_ALL}").strip().lower()
@@ -3552,53 +3553,141 @@ def run_comfyui_mode():
3552
3553
  if cui_choice == 'b':
3553
3554
  return
3554
3555
 
3555
- if cui_choice not in ['1', '2']:
3556
+ if cui_choice not in ['1', '2', '3']:
3556
3557
  continue
3557
3558
 
3558
3559
  if on_colab:
3559
- print(f"\n{Fore.YELLOW}⚠️ Google Colab Detected!{Style.RESET_ALL}")
3560
- print(f"{Fore.CYAN}👉 IMPORTANT: Switch to T4 GPU (Edit -> Notebook settings -> T4 GPU).{Style.RESET_ALL}")
3561
- time.sleep(2)
3560
+ while True:
3561
+ has_gpu = check_gpu()
3562
+ if not has_gpu:
3563
+ os.system('cls' if os.name == 'nt' else 'clear')
3564
+ print(f"\n{Fore.RED}⚠️ GPU NOT DETECTED ON COLAB!{Style.RESET_ALL}")
3565
+ print(f"\n{Fore.CYAN}👉 PLEASE FIX THIS NOW:{Style.RESET_ALL}")
3566
+ print(f" 1. Go to {Fore.YELLOW}Runtime -> Change runtime type{Fore.CYAN}")
3567
+ print(f" 2. Select {Fore.YELLOW}T4 GPU{Fore.CYAN}")
3568
+ print(f" 3. Click {Fore.YELLOW}Save{Fore.CYAN}")
3569
+ print(f"\n{Fore.WHITE}After switching, press Enter to retry or type 'cpu' to force slow CPU mode.{Style.RESET_ALL}")
3570
+
3571
+ user_resp = input(f"\n{Fore.LIGHTGREEN_EX}> {Style.RESET_ALL}").strip().lower()
3572
+ if user_resp == 'cpu':
3573
+ print(f"\n{Fore.YELLOW}⚠️ Forcing CPU mode... this will be extremely slow!{Style.RESET_ALL}")
3574
+ time.sleep(2)
3575
+ break
3576
+ continue
3577
+ else:
3578
+ print(f"\n{Fore.GREEN}✅ T4 GPU Detected! Proceeding...{Style.RESET_ALL}")
3579
+ time.sleep(1.5)
3580
+ break
3562
3581
 
3563
- print(f"\n{Fore.GREEN}🚀 Starting ComfyUI Setup & Session...{Style.RESET_ALL}")
3564
-
3565
3582
  # 0. Run System Initialization (comfyUI.py)
3566
3583
  init_script = os.path.join(script_dir, "comfyUI.py")
3567
3584
  if os.path.exists(init_script):
3568
- print(f"\n{Fore.CYAN}--- Running System Initialization ---{Style.RESET_ALL}")
3569
3585
  init_env = os.environ.copy()
3570
3586
  init_env["COMFYUI_WORKSPACE"] = workspace
3571
- subprocess.run([sys.executable, init_script], env=init_env)
3572
- else:
3573
- print(f"{Fore.YELLOW}Warning: {init_script} not found.{Style.RESET_ALL}")
3587
+ init_env["UPDATE_COMFY_UI"] = "false"
3588
+ with MoonSpinner("🚀 Setting up ComfyUI"):
3589
+ subprocess.run([sys.executable, init_script], env=init_env,
3590
+ stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
3574
3591
 
3575
- # 1. Handle Model Downloads if Anime chosen
3592
+ # 1. Handle Model Downloads if Anime or T2V chosen
3576
3593
  if cui_choice == '2':
3577
- print(f"\n{Fore.MAGENTA}✨ Configuring Anime Model (Anima)...{Style.RESET_ALL}")
3578
3594
  download_env = os.environ.copy()
3579
3595
  download_env["UNET_DIFFUSION_URLS"] = "https://huggingface.co/circlestone-labs/Anima/resolve/main/split_files/diffusion_models/anima-preview3-base.safetensors"
3580
3596
  download_env["TEXT_ENCODER_URLS"] = "https://huggingface.co/circlestone-labs/Anima/resolve/main/split_files/text_encoders/qwen_3_06b_base.safetensors"
3581
3597
  download_env["VAE_URLS"] = "https://huggingface.co/circlestone-labs/Anima/resolve/main/split_files/vae/qwen_image_vae.safetensors"
3582
3598
  download_env["COMFYUI_WORKSPACE"] = workspace
3583
-
3584
3599
  downloader_script = os.path.join(script_dir, "comfyu.py")
3585
3600
  if os.path.exists(downloader_script):
3586
- subprocess.run([sys.executable, downloader_script], env=download_env)
3601
+ with MoonSpinner("✨ Downloading Anima models"):
3602
+ subprocess.run([sys.executable, downloader_script], env=download_env,
3603
+ stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
3587
3604
 
3588
- # 2. Launch UI
3605
+ elif cui_choice == '3':
3606
+ download_env = os.environ.copy()
3607
+ download_env["UNET_DIFFUSION_URLS"] = "https://huggingface.co/unsloth/LTX-2.3-GGUF/resolve/main/ltx-2.3-22b-dev-Q4_0.gguf"
3608
+ download_env["VAE_URLS"] = "\n".join([
3609
+ "https://huggingface.co/unsloth/LTX-2.3-GGUF/resolve/main/vae/ltx-2.3-22b-dev_audio_vae.safetensors",
3610
+ "https://huggingface.co/unsloth/LTX-2.3-GGUF/resolve/main/vae/ltx-2.3-22b-dev_video_vae.safetensors",
3611
+ ])
3612
+ download_env["TEXT_ENCODERS_URLS"] = "https://huggingface.co/unsloth/gemma-3-12b-it-qat-GGUF/resolve/main/gemma-3-12b-it-qat-UD-Q4_K_XL.gguf"
3613
+ download_env["LORA_URLS"] = "https://huggingface.co/Lightricks/LTX-2.3/resolve/main/ltx-2.3-22b-distilled-lora-384.safetensors"
3614
+ download_env["LATENT_UPSCALE_URLS"] = "https://huggingface.co/Lightricks/LTX-2.3/resolve/main/ltx-2.3-spatial-upscaler-x2-1.0.safetensors"
3615
+ download_env["COMFYUI_WORKSPACE"] = workspace
3616
+ downloader_script = os.path.join(script_dir, "comfyu.py")
3617
+ if os.path.exists(downloader_script):
3618
+ with MoonSpinner("🎬 Downloading LTX-2.3 models"):
3619
+ subprocess.run([sys.executable, downloader_script], env=download_env,
3620
+ stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
3621
+
3622
+ # 2. Launch UI — show only tunnel URL, wait for /q
3589
3623
  ui_script = os.path.join(script_dir, "ui.py")
3590
- if os.path.exists(ui_script):
3591
- print(f"\n{Fore.CYAN}--- Initializing ComfyUI Interface ---{Style.RESET_ALL}")
3592
- try:
3593
- ui_env = os.environ.copy()
3594
- ui_env["COMFYUI_WORKSPACE"] = workspace
3595
- subprocess.run([sys.executable, ui_script], env=ui_env)
3596
- except Exception as e:
3597
- print(f"{Fore.RED}Error running ComfyUI: {e}{Style.RESET_ALL}")
3598
- else:
3624
+ if not os.path.exists(ui_script):
3599
3625
  print(f"{Fore.RED}Error: {ui_script} not found.{Style.RESET_ALL}")
3600
-
3601
- input("\nPress Enter to return to ComfyUI menu...")
3626
+ input("\nPress Enter to return to ComfyUI menu...")
3627
+ continue
3628
+
3629
+ # Write ComfyUI-Manager config to disable auto-update
3630
+ manager_config_dir = os.path.join(workspace, "user", "__manager")
3631
+ os.makedirs(manager_config_dir, exist_ok=True)
3632
+ manager_config_path = os.path.join(manager_config_dir, "config.ini")
3633
+ if not os.path.exists(manager_config_path):
3634
+ with open(manager_config_path, "w") as f:
3635
+ f.write("[default]\nskip_update_check = true\n")
3636
+
3637
+ ui_env = os.environ.copy()
3638
+ ui_env["COMFYUI_WORKSPACE"] = workspace
3639
+
3640
+ comfy_proc = None
3641
+ try:
3642
+ with MoonSpinner("⚙️ Starting ComfyUI"):
3643
+ comfy_proc = subprocess.Popen(
3644
+ [sys.executable, ui_script],
3645
+ env=ui_env,
3646
+ stdout=subprocess.PIPE,
3647
+ stderr=subprocess.STDOUT,
3648
+ text=True, bufsize=1
3649
+ )
3650
+ # Wait until tunnel URL appears
3651
+ tunnel_url = None
3652
+ for line in comfy_proc.stdout:
3653
+ if "trycloudflare.com" in line:
3654
+ for part in line.split():
3655
+ if "trycloudflare.com" in part and part.startswith("http"):
3656
+ tunnel_url = part.strip()
3657
+ break
3658
+ if tunnel_url:
3659
+ break
3660
+
3661
+ os.system('cls' if os.name == 'nt' else 'clear')
3662
+ if tunnel_url:
3663
+ print(f"\n{Fore.GREEN}{'='*60}{Style.RESET_ALL}")
3664
+ print(f"{Fore.GREEN}🚀 ComfyUI is LIVE:{Style.RESET_ALL} {Fore.CYAN}{tunnel_url}{Style.RESET_ALL}")
3665
+ print(f"{Fore.GREEN}{'='*60}{Style.RESET_ALL}")
3666
+ else:
3667
+ print(f"\n{Fore.YELLOW}⚠️ ComfyUI started but tunnel URL not found.{Style.RESET_ALL}")
3668
+ print(f"\nType {Fore.RED}/q{Style.RESET_ALL} to stop ComfyUI and return to menu.")
3669
+
3670
+ # Drain stdout in background so process doesn't block
3671
+ def _drain(proc):
3672
+ try:
3673
+ for _ in proc.stdout: pass
3674
+ except: pass
3675
+ threading.Thread(target=_drain, args=(comfy_proc,), daemon=True).start()
3676
+
3677
+ while True:
3678
+ try:
3679
+ user_input = input().strip().lower()
3680
+ if user_input in ['/q', '/quit']:
3681
+ break
3682
+ except EOFError:
3683
+ time.sleep(1)
3684
+ except KeyboardInterrupt:
3685
+ pass
3686
+ finally:
3687
+ if comfy_proc and comfy_proc.poll() is None:
3688
+ comfy_proc.terminate()
3689
+ try: comfy_proc.wait(timeout=5)
3690
+ except: comfy_proc.kill()
3602
3691
 
3603
3692
  def main_launcher():
3604
3693
  """Mode selection menu on startup"""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: webtools-cli
3
- Version: 1.3.5
3
+ Version: 1.3.7
4
4
  Summary: Advanced Web Intelligence & Scraping Toolkit with CLI and Web UI
5
5
  Author: Abhinav Adarsh
6
6
  License-Expression: MIT
File without changes
File without changes
File without changes