Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
popcord authored Apr 23, 2024
0 parents commit 60aa53d
Show file tree
Hide file tree
Showing 7 changed files with 233 additions and 0 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 PopCord

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# VisionCraft Models Checker

This script checks for new and unknown(deleted) sd/sdxl models from [VisionCraft](https://t.me/visioncraft_channel) and updates a JSON file accordingly to save datas.

## Usage

### Using Python Script

1. **Install Python**: If you haven't already, you'll need to [install Python](https://www.python.org/downloads/) on your computer.
2. **Clone the Repository**: Clone or download this repository to your local machine.
3. **Navigate to the Directory**: Open a terminal or command prompt and navigate to the directory where the `vc_models_checker.py` file is located.
4. **Install Dependencies**: If you haven't already, install the required dependencies using pip:
```bash
pip install requests
```
5. **Run the Script**: Execute the Python script by running the following command:
```bash
python vc_models_checker.py
```

### Using Executable File

1. **Download Executable**: Download the executable file (`vc_models_checker.exe`) from the [releases](https://github.com/popcord/VisionCraft-Models-Checker/releases/) page.
2. **Run the Executable**: Double-click the executable file to run it.

## Notes

- Ensure that you have an active internet connection while running the script or executable.
- The script will create or update a file named `config.json` in the same directory to store model information.

## License

This project is licensed under the [MIT License](LICENSE). (fake lol)
---
<div align="center">
<h1>exemple</h1>
<img src="https://raw.githubusercontent.com/popcord/VisionCraft-Models-Checker/main/image/screenshot.png" />

</div>


---
<div align="center">
<h1>viewers</h1>
<img src="https://profile-counter.glitch.me/VisionCraft-Models-Checker/count.svg" />

</div>
76 changes: 76 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
[
"absolute reality",
"AbyssOrangeMix",
"amigoXL",
"amIReal",
"animagineXL-3.1",
"anything-v5",
"artDiffusionXL",
"aziibPixelMix",
"AziibPixelMix",
"bb95FurryMix",
"blazing drive",
"bulaMix",
"CAT-anime",
"Celestial Magic",
"cetusmix",
"colossusProjectXL",
"copaxAnimeXL",
"copaxCuteXL",
"copaxMelodiesXL",
"copaxTimelessXL",
"copaxVividXL",
"counterfeit",
"cuteCartoonXL",
"Dalcefo",
"Deliberate",
"dolphinMix-v1.1",
"dreamshaper-v8",
"dreamshaperXL",
"dynaVisionXL",
"edgeOfRealism",
"EimisAnimeDiffusion",
"epicRealism",
"extraRealisticXL",
"extraRealisticXL+",
"filmRealistic-v1",
"formulaXL",
"ICBINP",
"juggernaut",
"juggernautXL",
"lofi-v4",
"lucidDreamRealistic",
"lyriel",
"magicFantasyXL",
"magicMIXRealisticV7",
"meinaHentai-v5",
"meinaMix-v11",
"MeinaUnreal",
"mysteriousXL-v4",
"neverendingDream",
"oilPaintXL",
"openDalle-1.1",
"peachXL",
"photoPerfectXL-beta",
"photoRealism-v1",
"photoVisionXL",
"raenaMix",
"realisticDeepDream",
"retroAnime",
"revAnimated",
"RunDiffusionFX-2.5D",
"rundiffusionRealistic",
"sdxl-base",
"sdxl-v3",
"SeekYou",
"simpleMix",
"spectrumBlendX",
"starlightXL",
"stockedRealityXL",
"stockedTensorXL",
"sudachi",
"sudachi-v1",
"thinkDiffusion",
"turbo-amigoXL",
"unrealEngine5XL"
]
1 change: 1 addition & 0 deletions image/d
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Binary file added image/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added vc_models_checker.exe
Binary file not shown.
88 changes: 88 additions & 0 deletions vc_models_checker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
import requests
import json

def fetch_models(url):
response = requests.get(url)
if response.status_code == 200:
return response.json()
else:
print("Failed to fetch data from the URL. Status code:", response.status_code)
return None

def load_existing_models(filename):
try:
with open(filename, "r") as file:
data = file.read()
if data:
return json.loads(data)
else:
return []
except FileNotFoundError:
return []

def save_models(filename, models):
with open(filename, "w") as file:
list = []
for model in sorted(models, key=lambda x: x.lower()):
list.append(model)
json.dump(list, file, indent=4)

def check_new_models(new_models, existing_models):
new_models = [model for model in new_models if model.lower() not in map(str.lower, existing_models)]
return new_models

def find_missing_models(response_models, existing_models):
missing_models = [model for model in existing_models if model.lower() not in map(str.lower, response_models)]
return missing_models

def update_models_file(filename, models):
save_models(filename, models)
print("The list has been successfully updated.")

def main():
url = "https://visioncraft.top/sd/models"
filename = "config.json"

response_models = fetch_models(url)
if response_models is None:
return

existing_models = load_existing_models(filename)

new_models = check_new_models(response_models, existing_models)
missing_models = find_missing_models(response_models, existing_models)

print("Registered models:", len(existing_models), "\n" + "#" * 25)

if new_models:
print(f"New models found ({len(new_models)}):")
for model in sorted(new_models, key=lambda x: x.lower()):
print("-", model)
print("-" * 25)
else:
print("No new models found.")

if missing_models:
print(f"New unknown models found ({len(missing_models)}):")
for model in missing_models:
print("-", model)
print("#" * 25)
else:
print("No unknown models found.")

if new_models or missing_models:
while True:
value = input("Do you want to update the list [y/n]? ").lower()
if value in ("y", "yes"):
update_models_file(filename, response_models)
break
elif value in ("n", "no"):
print("List not updated.")
break
else:
print("Invalid input\n" + "*" * 20)

input("Press any key to exit...")

if __name__ == "__main__":
main()

0 comments on commit 60aa53d

Please sign in to comment.