1313
1414sys .path .append (str (Path (__file__ ).parent .parent ))
1515from ai_diffusion import resources
16+ from ai_diffusion .resources import Arch , ModelFile , ModelResource , ResourceId , ResourceKind
1617
1718dir = Path (__file__ ).parent / "downloads"
1819
@@ -22,15 +23,29 @@ def url_strip(url: str):
2223 return without_host .split ("?" , 1 )[0 ]
2324
2425
25- files = {
26- url_unquote (url_strip (file .url )): dir / file .path
27- for m in resources .all_models (include_deprecated = True )
28- for file in m .files
29- }
30-
31- urls = {
32- url_strip (file .url ) for m in resources .all_models (include_deprecated = True ) for file in m .files
33- }
26+ all_models = list (resources .all_models (include_deprecated = True ))
27+ all_models .append (
28+ ModelResource (
29+ name = "Qwen3-VL-4B-Instruct" ,
30+ id = ResourceId (ResourceKind .checkpoint , Arch .qwen , "qwen3-vl-4b-instruct" ),
31+ files = [
32+ ModelFile (
33+ Path ("llm/Qwen3-VL-4B-Instruct-IQ4_XS.gguf" ),
34+ "https://huggingface.co/unsloth/Qwen3-VL-4B-Instruct-GGUF/resolve/main/Qwen3-VL-4B-Instruct-IQ4_XS.gguf" ,
35+ ResourceId (ResourceKind .checkpoint , Arch .qwen , "qwen3-vl-4b-instruct" ),
36+ "011018e3aba055a9250f9fb11efdeebfb6805df767922bfdb91607fce866416c" ,
37+ ),
38+ ModelFile (
39+ Path ("llm/mmproj-Qwen3-VL-4B-Instruct-BF16.gguf" ),
40+ "https://huggingface.co/unsloth/Qwen3-VL-4B-Instruct-GGUF/resolve/main/mmproj-BF16.gguf" ,
41+ ResourceId (ResourceKind .clip_vision , Arch .qwen , "qwen3-vl-4b-instruct" ),
42+ "364ef9a7502b7e9a834b9c013b953670f6ba2550b4a26fc043c317fa484eb53e" ,
43+ ),
44+ ],
45+ )
46+ )
47+ files = {url_unquote (url_strip (file .url )): dir / file .path for m in all_models for file in m .files }
48+ urls = {url_strip (file .url ) for m in all_models for file in m .files }
3449
3550
3651async def file_sender (file : Path ):
0 commit comments