Instructions to use levelife/basemodel with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use levelife/basemodel with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("levelife/basemodel", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Download train_args.json from levelife/basemodel: direct link, hf CLI and curl.
- Browser
- Download file 3.02 kB
-
https://huggingface.co/levelife/basemodel/resolve/main/train_args.json
- Command line
-
hf download hf://levelife/basemodel/train_args.json
-
curl -L -o train_args.json https://huggingface.co/levelife/basemodel/resolve/main/train_args.json
3.02 kB
| { | |
| "pretrained_model_name_or_path": "black-forest-labs/FLUX.1-dev", | |
| "revision": null, | |
| "variant": null, | |
| "dataset_name": "dresscode_mr", | |
| "dataset_config_name": null, | |
| "instance_data_dir": null, | |
| "cache_dir": null, | |
| "image_column": "image", | |
| "caption_column": null, | |
| "repeats": 1, | |
| "class_data_dir": null, | |
| "instance_prompt": null, | |
| "class_prompt": null, | |
| "max_sequence_length": 77, | |
| "validation_prompt": null, | |
| "num_validation_images": 4, | |
| "validation_epochs": 50, | |
| "with_prior_preservation": false, | |
| "prior_loss_weight": 1.0, | |
| "num_class_images": 100, | |
| "output_dir": "/home/ubuntu/life_file/code/train1/model/M1_baseline", | |
| "seed": 42, | |
| "resolution": 512, | |
| "center_crop": false, | |
| "random_flip": false, | |
| "train_text_encoder": false, | |
| "train_batch_size": 1, | |
| "sample_batch_size": 4, | |
| "num_train_epochs": 2, | |
| "max_train_steps": 7000, | |
| "checkpointing_steps": 3500, | |
| "checkpoints_total_limit": null, | |
| "resume_from_checkpoint": null, | |
| "gradient_accumulation_steps": 8, | |
| "gradient_checkpointing": true, | |
| "learning_rate": 2e-05, | |
| "edit_region_loss_lambda": 1.0, | |
| "region_loss_lambda": 0.0, | |
| "guidance_scale": 3.5, | |
| "text_encoder_lr": 5e-06, | |
| "scale_lr": false, | |
| "lr_scheduler": "constant_with_warmup", | |
| "lr_warmup_steps": 300, | |
| "lr_num_cycles": 1, | |
| "lr_power": 1.0, | |
| "dataloader_num_workers": 0, | |
| "weighting_scheme": "none", | |
| "logit_mean": 0.0, | |
| "logit_std": 1.0, | |
| "mode_scale": 1.29, | |
| "optimizer": "adamw", | |
| "use_8bit_adam": true, | |
| "adam_beta1": 0.9, | |
| "adam_beta2": 0.999, | |
| "prodigy_beta3": null, | |
| "prodigy_decouple": true, | |
| "adam_weight_decay": 0.0001, | |
| "adam_weight_decay_text_encoder": 0.001, | |
| "adam_epsilon": 1e-08, | |
| "prodigy_use_bias_correction": true, | |
| "prodigy_safeguard_warmup": true, | |
| "max_grad_norm": 1.0, | |
| "push_to_hub": false, | |
| "hub_token": null, | |
| "hub_model_id": null, | |
| "logging_dir": "logs", | |
| "allow_tf32": true, | |
| "report_to": "wandb", | |
| "mixed_precision": null, | |
| "prior_generation_precision": null, | |
| "local_rank": 0, | |
| "dataroot": "/home/ubuntu/life_file/dataset/DressCode-MR", | |
| "train_data_list": "train.json", | |
| "use_local_model": false, | |
| "local_model_path": null, | |
| "validation_steps": 1000, | |
| "num_inference_steps": 50, | |
| "validation_data_list": "val_5.jsonl", | |
| "train_verification_list": "val_5.jsonl", | |
| "width": 384, | |
| "height": 512, | |
| "controlnet_pretrained_model_name_or_path": null, | |
| "dropout_prob": 0, | |
| "train_base_model": true, | |
| "vit_path": "openai/clip-vit-base-patch16", | |
| "use_extra_residual": false, | |
| "use_extra_residual_concat": false, | |
| "insert_dino_hs": false, | |
| "lora_rank": 8, | |
| "lora_layers": null, | |
| "pretrained_lora_path": null, | |
| "fuse_lora": false, | |
| "lora_scale": 1.0, | |
| "num_img": 1, | |
| "pretrained_inpaint_model_name_or_path": "xiaozaa/flux1-fill-dev-diffusers", | |
| "train_lora": false, | |
| "enable_rgja_ref": false, | |
| "rgja_scale": 1.0, | |
| "rgja_lr": 0.0, | |
| "rgja_heads": 8, | |
| "rgja_dropout": 0.0, | |
| "ref_encoder_layers": 2, | |
| "use_kv_cache": false, | |
| "prompt_mode": "dataset", | |
| "prompt_dropout_prob": 0.1 | |
| } |