Open salamanders opened 7 months ago
There's an os.chdir ".." in the first(?) cell, I believe the notebook assumes you launched from inside the inference folder. Try commenting it out or just setting your cascade folder directly.
Hey that helped, thank you @throttlekitty ! I got one more step, after downloading a file it fails with:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[3], line 3
1 # SETUP MODELS & DATA
2 extras = core.setup_extras_pre()
----> 3 models = core.setup_models(extras)
4 models.generator.eval().requires_grad_(False)
5 print("STAGE C READY")
File ~/StableCascade/train/train_c.py:163, in WurstCore.setup_models(self, extras)
161 generator.load_state_dict(load_or_fail(self.config.generator_checkpoint_path))
162 else:
--> 163 for param_name, param in load_or_fail(self.config.generator_checkpoint_path).items():
164 set_module_tensor_to_device(generator, param_name, "cpu", value=param)
165 generator = generator.to(dtype).to(self.device)
AttributeError: 'NoneType' object has no attribute 'items'
Likely the same problem I had at first. Check that the config filenames match the models you downloaded. It's set to use models/stage_#_bf16.safetensors.
@throttlekitty interesting! Letsee.
~/StableCascade$ PYTHONPATH=./ ./venv/bin/python3 gradio_app/app.py
2024-02-17 01:15:23.583230: I external/local_tsl/tsl/cuda/cudart_stub.cc:32] Could not find cuda drivers on your machine, GPU will not be used.
Hey, not cool, yes they are...
(venv) me@tower:~/StableCascade$ ./venv/bin/python3
Python 3.11.4 (main, Dec 7 2023, 15:43:41) [GCC 12.3.0] on linux
>>> import torch
>>> print(f'\nAvailable cuda = {torch.cuda.is_available()}')
Available cuda = True
>>> print(f'\nGPUs availables = {torch.cuda.device_count()}')
GPUs availables = 1
>>> print(f'\nCurrent device = {torch.cuda.current_device()}')
Current device = 0
>>> print(f'\nCurrent Device location = {torch.cuda.device(0)}')
Current Device location = <torch.cuda.device object at 0x7fad6cb674d0>
>>> print(f'\nName of the device = {torch.cuda.get_device_name(0)}')
Name of the device = NVIDIA GeForce GTX 1080 Ti
Yay CUDA is installed. So why does it say it isn't. odd.
Back to standard notebook, back to your hint: 6251950402 Feb 13 15:22 stage_b.safetensors
oh hey!
dtype: bfloat16
Changing it to 32.models/stage_c_bf16.safetensors
- removing the _bf16
oops. The dtype: bfloat16
should stay that way.
Hey it got more steps! Cool! (Wow I'm really not used to python notebooks - it is strange not seeing what step is still running)
Things that went great:
git clone https://github.com/Stability-AI/StableCascade
python3 -m venv ./venv
source ./venv/bin/activate
./venv/bin/pip3 install jupyter
./venv/bin/pip3 install -r requirements.txt
cd models; bash download_models.sh essential big-big float32
./venv/bin/python3 -m notebook --generate-config
+ https://stackoverflow.com/questions/39155953/exposing-python-jupyter-on-lan./venv/bin/python3 -m notebook --ip 192.168.1.5 --port 8888
Where I got stuck: the second code block couldn't read the file, even though I checked and it is there.