f2cfe65d09
>It shouldn’t matter, as the optimizer should hold the references to the parameter (even after moving them). However, the “safer” approach would be to move the model to the device first and create the optimizer afterwards. https://discuss.pytorch.org/t/should-i-create-optimizer-after-sending-the-model-to-gpu/133418/2 https://discuss.pytorch.org/t/effect-of-calling-model-cuda-after-constructing-an-optimizer/15165 At least in my experience with hivemind, if you initialize the optimizer and move the model afterwards, it will throw errors about finding some data in CPU and other on GPU. This shouldn't affect performance or anything I believe. |
||
---|---|---|
dataset | ||
trainer | ||
.gitignore | ||
.gitmodules | ||
Dockerfile | ||
LICENSE | ||
README.md | ||
requirements.txt |
README.md
Waifu Diffusion
Waifu Diffusion is the name for this project of finetuning Stable Diffusion on anime-styled images.
1girl, aqua eyes, baseball cap, blonde hair, closed mouth, earrings, green background, hat, hoop earrings, jewelry, looking at viewer, shirt, short hair, simple background, solo, upper body, yellow shirt
Setup
pip install -r requirements.txt
Project Structure
├── dataset: Dataset preparation and utilities
│ ├── aesthetic: Aesthetic ranking
│ └── download: Downloading utilities
└── trainer: The actual training code
License
Training Code: AGPL-3.0 Model Weights: CreativeML Open RAIL-M