mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-06-19 20:23:41 +00:00
* [misc] update pre-commit * [misc] run pre-commit * [misc] remove useless configuration files * [misc] ignore cuda for clang-format
22 lines
449 B
Python
22 lines
449 B
Python
"""
|
|
torchrun --standalone --nproc_per_node=1 debug.py
|
|
"""
|
|
|
|
from diffusers import AutoencoderKL
|
|
|
|
import colossalai
|
|
from colossalai.zero import ColoInitContext
|
|
|
|
path = "/data/scratch/diffuser/stable-diffusion-v1-4"
|
|
|
|
colossalai.launch_from_torch(config={})
|
|
with ColoInitContext(device="cpu"):
|
|
vae = AutoencoderKL.from_pretrained(
|
|
path,
|
|
subfolder="vae",
|
|
revision=None,
|
|
)
|
|
|
|
for n, p in vae.named_parameters():
|
|
print(n)
|