Views
No views yet

CreativeML Open RAIL++-M license (see Inference for file hashes):
SDXL-base-0.9.SDXL-refiner-0.9.
SDXL-base-0.9: The base model was trained on a variety of aspect ratios on images with resolution 1024^2. The base model uses OpenCLIP-ViT/G and CLIP-ViT/L for text encoding whereas the refiner model only uses the OpenCLIP model.SDXL-refiner-0.9: The refiner has been trained to denoise small noise levels of high quality data and as such is not expected to work as a text-to-image model; instead, it should only be used as an image-to-image model.instantiate_from_config() on objects defined in yaml configs. See configs/ for many examples.ldm codebaseLatentDiffusion, now DiffusionEngine) has been cleaned up:GeneralConditioner, see sgm/modules/encoders/modules.py.sgm/modules/diffusionmodules/guiders.py) from the
samplers (sgm/modules/diffusionmodules/sampling.py), and the samplers are independent of the model.sgm/modules/diffusionmodules/denoiser.py.sgm/modules/diffusionmodules/denoiser_weighting.py), preconditioning of the network (sgm/modules/diffusionmodules/denoiser_scaling.py), and sampling of noise levels during training (sgm/modules/diffusionmodules/sigma_sampling.py).1git clone git@github.com:Stability-AI/generative-models.git
2cd generative-modelsgenerative-models root after cloning it.python3.8 and python3.10. For other python versions, you might encounter version conflicts.1# install required packages from pypi
2python3 -m venv .pt13
3source .pt13/bin/activate
4pip3 install -r requirements/pt13.txt1# install required packages from pypi
2python3 -m venv .pt2
3source .pt2/bin/activate
4pip3 install -r requirements/pt2.txtsgmpip3 install .sdata for trainingpip3 install -e git+https://github.com/Stability-AI/datapipelines.git@main#egg=sdatahatch and run hatch build
(specifying -t wheel will skip building a sdist, which is not necessary).pip install hatch
hatch build -t wheeldist/. You can install the wheel with pip install dist/*.whl.scripts/demo/sampling.py.
We provide file hashes for the complete file as well as for only the saved tensors in the file (see Model Spec for a script to evaluate that).
The following models are currently supported:File Hash (sha256): 31e35c80fc4829d14f90153f4c74cd59c90b779f6afe05a74cd6120b893f7e5b
Tensordata Hash (sha256): 0xd7a9105a900fd52748f20725fe52fe52b507fd36bee4fc107b1550a26e6ee1d7File Hash (sha256): 7440042bbdc8a24813002c09b6b69b64dc90fded4472613437b7f55f9b7d9c5f
Tensordata Hash (sha256): 0x1a77d21bebc4b4de78c474a90cb74dc0d2217caf4061971dbfa75ad406b75d81CreativeML Open RAIL++-M license) here:checkpoints/.
Next, start the demo usingstreamlit run scripts/demo/sampling.py --server.port <your_port>1python -m venv .detect
2source .detect/bin/activate
3
4pip install "numpy>=1.17" "PyWavelets>=1.1.1" "opencv-python>=4.1.0.25"
5pip install --no-deps invisible-watermarksource .pt1/bin/activate):1# test a single file
2python scripts/demo/detect.py <your filename here>
3# test multiple files at once
4python scripts/demo/detect.py <filename 1> <filename 2> ... <filename n>
5# test all files in a specific folder
6python scripts/demo/detect.py <your folder name here>/*configs/example_training. To launch a training, runpython main.py --base configs/<config1.yaml> configs/<config2.yaml>python main.py --base configs/example_training/toy/mnist_cond.yamlconfigs/example_training/imagenet-f8_cond.yaml, configs/example_training/txt2img-clipl.yaml and configs/example_training/txt2img-clipl-legacy-ucg-training.yaml for training will require edits depending on the used dataset (which is expected to stored in tar-file in the webdataset-format). To find the parts which have to be adapted, search for comments containing USER: in the respective config.pytorch1.13 and pytorch2for training generative models. However for autoencoder training as e.g. in configs/example_training/autoencoder/kl-f4/imagenet-attnfree-logvar.yaml, only pytorch1.13 is supported.configs/example_training/imagenet-f8_cond.yaml) requires retrieving the checkpoint from Hugging Face and replacing the CKPT_PATH placeholder in this line. The same is to be done for the provided text-to-image configs.GeneralConditioner is configured through the conditioner_config. Its only attribute is emb_models, a list of
different embedders (all inherited from AbstractEmbModel) that are used to condition the generative model.
All embedders should define whether or not they are trainable (is_trainable, default False), a classifier-free
guidance dropout rate is used (ucg_rate, default 0), and an input key (input_key), for example, txt for text-conditioning or cls for class-conditioning.
When computing conditionings, the embedder will get batch[input_key] as input.
We currently support two to four dimensional conditionings and conditionings of different embedders are concatenated
appropriately.
Note that the order of the embedders in the conditioner_config is important.network_config. This used to be called unet_config, which is not general
enough as we plan to experiment with transformer-based diffusion backbones.loss_config. For standard diffusion model training, you will have to set sigma_sampler_config.sampler_config, we set the type of numerical
solver, number of steps, type of discretization, as well as, for example, guidance wrappers for classifier-free
guidance.1example = {"jpg": x, # this is a tensor -1...1 chw
2 "txt": "a beautiful image"}