Instructions to use ACCC1380/nyako_style with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ACCC1380/nyako_style with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("circlestone-labs/Anima", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("ACCC1380/nyako_style") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Download scripts/run_training.py from ACCC1380/nyako_style: direct link, hf CLI and curl.
- Browser
- Download file 1.25 kB
-
https://huggingface.co/ACCC1380/nyako_style/resolve/main/scripts/run_training.py
- Command line
-
hf download hf://ACCC1380/nyako_style/scripts/run_training.py
-
curl -L -o run_training.py https://huggingface.co/ACCC1380/nyako_style/resolve/main/scripts/run_training.py
1.25 kB
| import os,subprocess,json,time,sys | |
| from pathlib import Path | |
| root=Path('/data/nyako-training-150'); art=root/'artifacts' | |
| env=os.environ.copy();env['PYTHONUNBUFFERED']='1';env['TOKENIZERS_PARALLELISM']='false';env['OMP_NUM_THREADS']='8' | |
| cmd=[str(root/'venv/bin/python'),'scripts/dev/anima_train_network.py','--config_file',str(art/'config/train.toml')] | |
| (art/'config/launch.json').write_text(json.dumps({'command':cmd,'cwd':str(root/'lora-scripts-next')},indent=2)) | |
| (art/'config/trainer_commit.txt').write_bytes(subprocess.check_output(['git','rev-parse','HEAD'],cwd=root/'lora-scripts-next')) | |
| with (art/'config/packages.txt').open('w') as f:subprocess.run([str(root/'venv/bin/pip'),'freeze'],stdout=f) | |
| (root/'status.json').write_text(json.dumps({'stage':'training','started':time.time()})) | |
| with (art/'logs/train.log').open('w') as f: | |
| result=subprocess.run(cmd,cwd=root/'lora-scripts-next',env=env,stdout=f,stderr=subprocess.STDOUT) | |
| (root/'status.json').write_text(json.dumps({'stage':'training_finished' if result.returncode==0 else 'training_failed','returncode':result.returncode,'time':time.time()})) | |
| if result.returncode: sys.exit(result.returncode) | |
| subprocess.run([str(root/'venv/bin/python'),str(root/'scripts/upload.py')],check=True,env=env) | |