Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Own Model is Not Working #281

Open
redflagrul opened this issue Nov 22, 2024 · 1 comment
Open

Using Own Model is Not Working #281

redflagrul opened this issue Nov 22, 2024 · 1 comment

Comments

@redflagrul
Copy link

image
Starting fastsdcpu...
Python command check :OK
Python version: 3.11.0
Running on Windows platform
OS: Windows-10-10.0.19044-SP0
Processor: Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
Using device : cpu
Found 1 LCM models in config/lcm-models.txt
Found 1 stable diffusion models in config/stable-diffusion-models.txt
Found 0 LCM-LoRA models in config/lcm-lora-models.txt
Found 0 OpenVINO LCM models in config/openvino-lcm-models.txt
Starting desktop GUI mode(Qt)
Torch datatype : torch.float32
Error:stabilityai/sd-turbo Model not found in configuration file,so using first model : C:\fastsdcpu\models\SD1.5\realismByStableYogi_v6LCM.safetensors
Error:Lykon/dreamshaper-8 Model not found in configuration file,so using first model : C:\fastsdcpu\models\SD1.5\realismByStableYogi_v6LCM.safetensors
Warning: model configuration file/directory is empty,please add some models.
Warning: model configuration file/directory is empty,please add some models.
Output path : C:\fastsdcpu\results
{'clip_skip': 1,
'controlnet': None,
'diffusion_task': 'text_to_image',
'dirs': {'controlnet': 'C:\fastsdcpu\controlnet_models',
'lora': 'C:\fastsdcpu\lora_models'},
'gguf_model': {'clip_path': None,
'diffusion_path': None,
'gguf_models': 'C:\fastsdcpu\models\gguf',
't5xxl_path': None,
'vae_path': None},
'guidance_scale': 1.0,
'image_height': 512,
'image_width': 512,
'inference_steps': 10,
'init_image': None,
'lcm_lora': {'base_model_id': 'C:\fastsdcpu\models\SD1.5\realismByStableYogi_v6LCM.safetensors',
'lcm_lora_id': ''},
'lcm_model_id': 'C:\fastsdcpu\models\SD1.5\realismByStableYogi_v6LCM.safetensors',
'lora': {'enabled': False,
'fuse': True,
'models_dir': 'C:\fastsdcpu\lora_models',
'path': '',
'weight': 0.5},
'negative_prompt': '',
'number_of_images': 1,
'openvino_lcm_model_id': '',
'prompt': 'Selena Gomez in GYM',
'rebuild_pipeline': False,
'seed': -1,
'strength': 0.6,
'token_merging': 0.0,
'use_gguf_model': False,
'use_lcm_lora': False,
'use_offline_model': False,
'use_openvino': False,
'use_safety_checker': False,
'use_seed': False,
'use_tiny_auto_encoder': False}
***** Init LCM Model pipeline - C:\fastsdcpu\models\SD1.5\realismByStableYogi_v6LCM.safetensors *****
model_index.json: 100%|███████████████████████████████████████████████████████████████████████| 541/541 [00:00<?, ?B/s]
(…)ature_extractor/preprocessor_config.json: 100%|████████████████████████████████████| 342/342 [00:00<00:00, 21.9kB/s]
safety_checker/config.json: 100%|█████████████████████████████████████████████████████████| 4.72k/4.72k [00:00<?, ?B/s]
tokenizer/tokenizer_config.json: 100%|████████████████████████████████████████████████████████| 806/806 [00:00<?, ?B/s]
text_encoder/config.json: 100%|███████████████████████████████████████████████████████████████| 617/617 [00:00<?, ?B/s]
scheduler/scheduler_config.json: 100%|████████████████████████████████████████████████████████| 308/308 [00:00<?, ?B/s]
tokenizer/special_tokens_map.json: 100%|██████████████████████████████████████████████| 472/472 [00:00<00:00, 30.2kB/s]
C:\fastsdcpu\env\Lib\site-packages\huggingface_hub\file_download.py:139: UserWarning: huggingface_hub cache-system uses symlinks by default to efficiently store duplicated files but your machine does not support them in C:\Users\LTS.cache\huggingface\hub\models--runwayml--stable-diffusion-v1-5. Caching files will still work but in a degraded version that might require more space on your disk. This warning can be disabled by setting the HF_HUB_DISABLE_SYMLINKS_WARNING environment variable. For more details, see https://huggingface.co/docs/huggingface_hub/how-to-cache#limitations.
To support symlinks on Windows, you either need to activate Developer Mode or to run Python as an administrator. In order to activate developer mode, see this article: https://docs.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development
warnings.warn(message)
Fetching 11 files: 9%|█████▊ | 1/11 [00:00<00:03, 3.05it/s]
tokenizer/merges.txt: 100%|█████████████████████████████████████████████████████████| 525k/525k [00:00<00:00, 5.60MB/s]
vae/config.json: 100%|████████████████████████████████████████████████████████████████████████| 547/547 [00:00<?, ?B/s]
unet/config.json: 100%|███████████████████████████████████████████████████████████████████████| 743/743 [00:00<?, ?B/s]
tokenizer/vocab.json: 100%|███████████████████████████████████████████████████████| 1.06M/1.06M [00:00<00:00, 4.42MB/s]
Traceback (most recent call last):
File "C:\fastsdcpu\src\frontend\gui\image_generator_worker.py", line 29, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\fastsdcpu\src\frontend\gui\app_window.py", line 595, in generate_image
images = self.context.generate_text_to_image(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\fastsdcpu\src\context.py", line 55, in generate_text_to_image
self.lcm_text_to_image.init(
File "C:\fastsdcpu\src\backend\lcm_text_to_image.py", line 290, in init
self.pipeline = get_lcm_model_pipeline(
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\fastsdcpu\src\backend\pipelines\lcm.py", line 82, in get_lcm_model_pipeline
dummy_pipeline = StableDiffusionPipeline.from_single_file(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\fastsdcpu\env\Lib\site-packages\huggingface_hub\utils_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "C:\fastsdcpu\env\Lib\site-packages\diffusers\loaders\single_file.py", line 403, in from_single_file
cached_model_config_path = _download_diffusers_model_config_from_hub(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\fastsdcpu\env\Lib\site-packages\diffusers\loaders\single_file.py", line 249, in _download_diffusers_model_config_from_hub
cached_model_path = snapshot_download(
^^^^^^^^^^^^^^^^^^
File "C:\fastsdcpu\env\Lib\site-packages\huggingface_hub\utils_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "C:\fastsdcpu\env\Lib\site-packages\huggingface_hub_snapshot_download.py", line 293, in snapshot_download
thread_map(
File "C:\fastsdcpu\env\Lib\site-packages\tqdm\contrib\concurrent.py", line 69, in thread_map
return _executor_map(ThreadPoolExecutor, fn, *iterables, **tqdm_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\fastsdcpu\env\Lib\site-packages\tqdm\contrib\concurrent.py", line 51, in _executor_map
return list(tqdm_class(ex.map(fn, *iterables, chunksize=chunksize), **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\fastsdcpu\env\Lib\site-packages\tqdm\std.py", line 1181, in iter
for obj in iterable:
File "C:\Program Files\Python311\Lib\concurrent\futures_base.py", line 619, in result_iterator
yield _result_or_cancel(fs.pop())
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\concurrent\futures_base.py", line 317, in _result_or_cancel
return fut.result(timeout)
^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\concurrent\futures_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\concurrent\futures_base.py", line 401, in __get_result
raise self._exception
File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\fastsdcpu\env\Lib\site-packages\huggingface_hub_snapshot_download.py", line 267, in _inner_hf_hub_download
return hf_hub_download(
^^^^^^^^^^^^^^^^
File "C:\fastsdcpu\env\Lib\site-packages\huggingface_hub\utils_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "C:\fastsdcpu\env\Lib\site-packages\huggingface_hub\file_download.py", line 862, in hf_hub_download
return _hf_hub_download_to_cache_dir(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\fastsdcpu\env\Lib\site-packages\huggingface_hub\file_download.py", line 1022, in _hf_hub_download_to_cache_dir
_create_symlink(blob_path, pointer_path, new_blob=True)
File "C:\fastsdcpu\env\Lib\site-packages\huggingface_hub\file_download.py", line 586, in _create_symlink
os.symlink(src_rel_or_abs, abs_dst)
OSError: [WinError 1314] A required privilege is not held by the client: '..\..\blobs\daf7e2e2dfc64fb437a2b44525667111b00cb9fc' -> 'C:\Users\LTS\.cache\huggingface\hub\models--runwayml--stable-diffusion-v1-5\snapshots\f03de327dd89b501a01da37fc5240cf4fdba85a1\model_index.json'
{'clip_skip': 1,
'controlnet': None,
'diffusion_task': 'text_to_image',
'dirs': {'controlnet': 'C:\fastsdcpu\controlnet_models',
'lora': 'C:\fastsdcpu\lora_models'},
'gguf_model': {'clip_path': None,
'diffusion_path': None,
'gguf_models': 'C:\fastsdcpu\models\gguf',
't5xxl_path': None,
'vae_path': None},
'guidance_scale': 1.0,
'image_height': 512,
'image_width': 512,
'inference_steps': 10,
'init_image': None,
'lcm_lora': {'base_model_id': 'C:\fastsdcpu\models\SD1.5\realismByStableYogi_v6LCM.safetensors',
'lcm_lora_id': ''},
'lcm_model_id': 'C:\fastsdcpu\models\SD1.5\realismByStableYogi_v6LCM.safetensors',
'lora': {'enabled': False,
'fuse': True,
'models_dir': 'C:\fastsdcpu\lora_models',
'path': '',
'weight': 0.5},
'negative_prompt': '',
'number_of_images': 1,
'openvino_lcm_model_id': '',
'prompt': 'Selena Gomez in GYM',
'rebuild_pipeline': False,
'seed': -1,
'strength': 0.6,
'token_merging': 0.0,
'use_gguf_model': False,
'use_lcm_lora': False,
'use_offline_model': True,
'use_openvino': False,
'use_safety_checker': False,
'use_seed': False,
'use_tiny_auto_encoder': False}
***** Init LCM Model pipeline - C:\fastsdcpu\models\SD1.5\realismByStableYogi_v6LCM.safetensors *****
Traceback (most recent call last):
File "C:\fastsdcpu\src\frontend\gui\image_generator_worker.py", line 29, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\fastsdcpu\src\frontend\gui\app_window.py", line 595, in generate_image
images = self.context.generate_text_to_image(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\fastsdcpu\src\context.py", line 55, in generate_text_to_image
self.lcm_text_to_image.init(
File "C:\fastsdcpu\src\backend\lcm_text_to_image.py", line 290, in init
self.pipeline = get_lcm_model_pipeline(
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\fastsdcpu\src\backend\pipelines\lcm.py", line 82, in get_lcm_model_pipeline
dummy_pipeline = StableDiffusionPipeline.from_single_file(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\fastsdcpu\env\Lib\site-packages\huggingface_hub\utils_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "C:\fastsdcpu\env\Lib\site-packages\diffusers\loaders\single_file.py", line 412, in from_single_file
config_dict = pipeline_class.load_config(cached_model_config_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\fastsdcpu\env\Lib\site-packages\huggingface_hub\utils_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "C:\fastsdcpu\env\Lib\site-packages\diffusers\configuration_utils.py", line 373, in load_config
raise EnvironmentError(
OSError: Error no file named model_index.json found in directory C:\Users\LTS.cache\huggingface\hub\models--runwayml--stable-diffusion-v1-5\snapshots\f03de327dd89b501a01da37fc5240cf4fdba85a1.

@monstruosoft
Copy link
Contributor

IIRC .safetensors loading is only implemented in the LCM-LoRA pipeline, not in the LCM pipeline; at the time I didn't know there was LCM models in .safetensors format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants