webtools-cli 1.3.4__tar.gz → 1.3.6__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.4 → webtools_cli-1.3.6}/ComfyUI/ui.py +17 -0
  2. {webtools_cli-1.3.4/webtools_cli.egg-info → webtools_cli-1.3.6}/PKG-INFO +1 -1
  3. {webtools_cli-1.3.4 → webtools_cli-1.3.6}/pyproject.toml +1 -1
  4. {webtools_cli-1.3.4 → webtools_cli-1.3.6}/webtools/core.py +37 -17
  5. {webtools_cli-1.3.4 → webtools_cli-1.3.6/webtools_cli.egg-info}/PKG-INFO +1 -1
  6. {webtools_cli-1.3.4 → webtools_cli-1.3.6}/ComfyUI/comfyUI.py +0 -0
  7. {webtools_cli-1.3.4 → webtools_cli-1.3.6}/ComfyUI/comfyu.py +0 -0
  8. {webtools_cli-1.3.4 → webtools_cli-1.3.6}/LICENSE +0 -0
  9. {webtools_cli-1.3.4 → webtools_cli-1.3.6}/README.md +0 -0
  10. {webtools_cli-1.3.4 → webtools_cli-1.3.6}/setup.cfg +0 -0
  11. {webtools_cli-1.3.4 → webtools_cli-1.3.6}/webtools/__init__.py +0 -0
  12. {webtools_cli-1.3.4 → webtools_cli-1.3.6}/webtools/__main__.py +0 -0
  13. {webtools_cli-1.3.4 → webtools_cli-1.3.6}/webtools/cli.py +0 -0
  14. {webtools_cli-1.3.4 → webtools_cli-1.3.6}/webtools/install.py +0 -0
  15. {webtools_cli-1.3.4 → webtools_cli-1.3.6}/webtools/mega_client.py +0 -0
  16. {webtools_cli-1.3.4 → webtools_cli-1.3.6}/webtools/web/index.html +0 -0
  17. {webtools_cli-1.3.4 → webtools_cli-1.3.6}/webtools/web/script.js +0 -0
  18. {webtools_cli-1.3.4 → webtools_cli-1.3.6}/webtools/web/style.css +0 -0
  19. {webtools_cli-1.3.4 → webtools_cli-1.3.6}/webtools_cli.egg-info/SOURCES.txt +0 -0
  20. {webtools_cli-1.3.4 → webtools_cli-1.3.6}/webtools_cli.egg-info/dependency_links.txt +0 -0
  21. {webtools_cli-1.3.4 → webtools_cli-1.3.6}/webtools_cli.egg-info/entry_points.txt +0 -0
  22. {webtools_cli-1.3.4 → webtools_cli-1.3.6}/webtools_cli.egg-info/requires.txt +0 -0
  23. {webtools_cli-1.3.4 → webtools_cli-1.3.6}/webtools_cli.egg-info/top_level.txt +0 -0
@@ -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.4
3
+ Version: 1.3.6
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.4"
7
+ version = "1.3.6"
8
8
  description = "Advanced Web Intelligence & Scraping Toolkit with CLI and Web UI"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -3528,12 +3528,18 @@ def run_comfyui_mode():
3528
3528
  input("\nPress Enter to return to main menu...")
3529
3529
  return
3530
3530
 
3531
- comfy_dir = find_comfy_dir()
3532
- if not comfy_dir:
3533
- print(f"\n{Fore.RED}❌ ERROR: ComfyUI folder not found!{Style.RESET_ALL}")
3531
+ script_dir = find_comfy_dir()
3532
+ if not script_dir:
3533
+ print(f"\n{Fore.RED}❌ ERROR: ComfyUI scripts not found!{Style.RESET_ALL}")
3534
3534
  input("\nPress Enter to return to main menu...")
3535
3535
  return
3536
3536
 
3537
+ # Define the actual ComfyUI repository workspace
3538
+ if on_colab:
3539
+ workspace = "/content/ComfyUI"
3540
+ else:
3541
+ workspace = os.path.join(script_dir, "ComfyUI_repo")
3542
+
3537
3543
  while True:
3538
3544
  os.system('cls' if os.name == 'nt' else 'clear')
3539
3545
  print(f"\n{Fore.CYAN}--- ComfyUI Launcher ---{Style.RESET_ALL}")
@@ -3550,22 +3556,39 @@ def run_comfyui_mode():
3550
3556
  continue
3551
3557
 
3552
3558
  if on_colab:
3553
- print(f"\n{Fore.YELLOW}⚠️ Google Colab Detected!{Style.RESET_ALL}")
3554
- print(f"{Fore.CYAN}👉 IMPORTANT: Switch to T4 GPU (Edit -> Notebook settings -> T4 GPU).{Style.RESET_ALL}")
3555
- time.sleep(2)
3559
+ while True:
3560
+ has_gpu = check_gpu()
3561
+ if not has_gpu:
3562
+ os.system('cls' if os.name == 'nt' else 'clear')
3563
+ print(f"\n{Fore.RED}⚠️ GPU NOT DETECTED ON COLAB!{Style.RESET_ALL}")
3564
+ print(f"\n{Fore.CYAN}👉 PLEASE FIX THIS NOW:{Style.RESET_ALL}")
3565
+ print(f" 1. Go to {Fore.YELLOW}Runtime -> Change runtime type{Fore.CYAN}")
3566
+ print(f" 2. Select {Fore.YELLOW}T4 GPU{Fore.CYAN}")
3567
+ print(f" 3. Click {Fore.YELLOW}Save{Fore.CYAN}")
3568
+ print(f"\n{Fore.WHITE}After switching, press Enter to retry or type 'cpu' to force slow CPU mode.{Style.RESET_ALL}")
3569
+
3570
+ user_resp = input(f"\n{Fore.LIGHTGREEN_EX}> {Style.RESET_ALL}").strip().lower()
3571
+ if user_resp == 'cpu':
3572
+ print(f"\n{Fore.YELLOW}⚠️ Forcing CPU mode... this will be extremely slow!{Style.RESET_ALL}")
3573
+ time.sleep(2)
3574
+ break
3575
+ continue
3576
+ else:
3577
+ print(f"\n{Fore.GREEN}✅ T4 GPU Detected! Proceeding...{Style.RESET_ALL}")
3578
+ time.sleep(1.5)
3579
+ break
3556
3580
 
3557
3581
  print(f"\n{Fore.GREEN}🚀 Starting ComfyUI Setup & Session...{Style.RESET_ALL}")
3558
3582
 
3559
3583
  # 0. Run System Initialization (comfyUI.py)
3560
- # This ensures the ComfyUI repo is cloned and dependencies are installed
3561
- init_script = os.path.join(comfy_dir, "comfyUI.py")
3584
+ init_script = os.path.join(script_dir, "comfyUI.py")
3562
3585
  if os.path.exists(init_script):
3563
3586
  print(f"\n{Fore.CYAN}--- Running System Initialization ---{Style.RESET_ALL}")
3564
3587
  init_env = os.environ.copy()
3565
- init_env["COMFYUI_WORKSPACE"] = comfy_dir
3588
+ init_env["COMFYUI_WORKSPACE"] = workspace
3566
3589
  subprocess.run([sys.executable, init_script], env=init_env)
3567
3590
  else:
3568
- print(f"{Fore.YELLOW}Warning: {init_script} not found. Skipping initialization.{Style.RESET_ALL}")
3591
+ print(f"{Fore.YELLOW}Warning: {init_script} not found.{Style.RESET_ALL}")
3569
3592
 
3570
3593
  # 1. Handle Model Downloads if Anime chosen
3571
3594
  if cui_choice == '2':
@@ -3574,22 +3597,19 @@ def run_comfyui_mode():
3574
3597
  download_env["UNET_DIFFUSION_URLS"] = "https://huggingface.co/circlestone-labs/Anima/resolve/main/split_files/diffusion_models/anima-preview3-base.safetensors"
3575
3598
  download_env["TEXT_ENCODER_URLS"] = "https://huggingface.co/circlestone-labs/Anima/resolve/main/split_files/text_encoders/qwen_3_06b_base.safetensors"
3576
3599
  download_env["VAE_URLS"] = "https://huggingface.co/circlestone-labs/Anima/resolve/main/split_files/vae/qwen_image_vae.safetensors"
3577
- download_env["COMFYUI_WORKSPACE"] = comfy_dir
3600
+ download_env["COMFYUI_WORKSPACE"] = workspace
3578
3601
 
3579
- # Run comfyu.py with these env vars
3580
- downloader_script = os.path.join(comfy_dir, "comfyu.py")
3602
+ downloader_script = os.path.join(script_dir, "comfyu.py")
3581
3603
  if os.path.exists(downloader_script):
3582
3604
  subprocess.run([sys.executable, downloader_script], env=download_env)
3583
- else:
3584
- print(f"{Fore.RED}Error: {downloader_script} not found.{Style.RESET_ALL}")
3585
3605
 
3586
3606
  # 2. Launch UI
3587
- ui_script = os.path.join(comfy_dir, "ui.py")
3607
+ ui_script = os.path.join(script_dir, "ui.py")
3588
3608
  if os.path.exists(ui_script):
3589
3609
  print(f"\n{Fore.CYAN}--- Initializing ComfyUI Interface ---{Style.RESET_ALL}")
3590
3610
  try:
3591
3611
  ui_env = os.environ.copy()
3592
- ui_env["COMFYUI_WORKSPACE"] = comfy_dir
3612
+ ui_env["COMFYUI_WORKSPACE"] = workspace
3593
3613
  subprocess.run([sys.executable, ui_script], env=ui_env)
3594
3614
  except Exception as e:
3595
3615
  print(f"{Fore.RED}Error running ComfyUI: {e}{Style.RESET_ALL}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: webtools-cli
3
- Version: 1.3.4
3
+ Version: 1.3.6
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