Text-to-Image
Diffusers
Safetensors
StableDiffusionPipeline
trl
o2o
reinforcement-learning
stable-diffusion
Instructions to use hoan17/saving_D500S100_github_140 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use hoan17/saving_D500S100_github_140 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("hoan17/saving_D500S100_github_140", 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
- Local Apps Settings
- Draw Things
- DiffusionBee
Push model using huggingface_hub.
Browse filesFiles changed (16)
- README.mdAdded+16
- config.jsonAdded+61
- feature_extractor/preprocessor_config.jsonAdded+27
- model_index.jsonAdded+38
- pytorch_lora_weights.safetensorsAdded+3
- scheduler/scheduler_config.jsonAdded+20
- text_encoder/config.jsonAdded+24
- text_encoder/model.safetensorsAdded+3
- tokenizer/merges.txtAdded
- tokenizer/special_tokens_map.jsonAdded+30
- tokenizer/tokenizer_config.jsonAdded+39
- tokenizer/vocab.jsonAdded
- unet/config.jsonAdded+73
- unet/diffusion_pytorch_model.safetensorsAdded+3
- vae/config.jsonAdded+38
- vae/diffusion_pytorch_model.safetensorsAdded+3
12345678910111213141516---license: apache-2.0tags:- trl- o2o- diffusers- reinforcement-learning- text-to-image- stable-diffusion---
# TRL O2O Model
This is a diffusion model that has been fine-tuned with reinforcement learning to guide the model outputs according to a value, function, or human feedback. The model can be used for image generation conditioned with text.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061{ "accelerator_kwargs": {}, "allow_tf32": true, "async_reward_computation": false, "dataset_index": 14, "exp_name": "o2o", "global_step": 0, "high_reward": 1.0, "huggingface_note": "D500S100_github", "log_with": "wandb", "logdir": "logs", "low_reward": 0.0, "lr_scheduler": "constant", "max_iteration": 170, "max_workers": 2, "metric_moving_const": 0.9, "mixed_precision": "fp16", "negative_prompts": "", "num_checkpoint_limit": 10, "num_epochs": 1, "offpolicy_sample_batch_size": 3, "online_multification_number": 1, "per_prompt_stat_tracking": false, "per_prompt_stat_tracking_buffer_size": 16, "per_prompt_stat_tracking_min_count": 16, "project_kwargs": { "automatic_checkpoint_naming": true, "logging_dir": "./outputs/logs", "project_dir": "./outputs/", "total_limit": 5 }, "resolution": 768, "resume_from": "", "run_name": "", "sample_eta": 1.0, "sample_guidance_scale": 5.0, "sample_num_batches_per_iteration": 1, "sample_num_steps": 100, "save_freq": 10, "save_start": 140, "seed": 1, "show_metrics": true, "test_mode": true, "tracker_kwargs": {}, "tracker_project_name": "Dev", "train_adam_beta1": 0.9, "train_adam_beta2": 0.999, "train_adam_epsilon": 1e-08, "train_adam_weight_decay": 0.0001, "train_adv_clip_max": 5.0, "train_batch_size": 6, "train_cfg": true, "train_clip_range": 0.0001, "train_gradient_accumulation_steps": 1, "train_learning_rate": 0.0003, "train_max_grad_norm": 1.0, "train_num_inner_iterations": 1, "train_timestep_fraction": 1.0, "train_use_8bit_adam": false, "usage_dataset_size": 500}123456789101112131415161718192021222324252627{ "crop_size": { "height": 224, "width": 224 }, "do_center_crop": true, "do_convert_rgb": true, "do_normalize": true, "do_rescale": true, "do_resize": true, "image_mean": [ 0.48145466, 0.4578275, 0.40821073 ], "image_processor_type": "CLIPImageProcessor", "image_std": [ 0.26862954, 0.26130258, 0.27577711 ], "resample": 3, "rescale_factor": 0.00392156862745098, "size": { "shortest_edge": 224 }}1234567891011121314151617181920212223242526272829303132333435363738{ "_class_name": "StableDiffusionPipeline", "_diffusers_version": "0.35.2", "_name_or_path": "hoan17/stablediffusion2.1bk", "feature_extractor": [ "transformers", "CLIPImageProcessor" ], "image_encoder": [ null, null ], "requires_safety_checker": false, "safety_checker": [ null, null ], "scheduler": [ "diffusers", "DDIMScheduler" ], "text_encoder": [ "transformers", "CLIPTextModel" ], "tokenizer": [ "transformers", "CLIPTokenizer" ], "unet": [ "diffusers", "UNet2DConditionModel" ], "vae": [ "diffusers", "AutoencoderKL" ]}123version https://git-lfs.github.com/spec/v1oid sha256:dd38682c461dfbdc28913d67d52e061cf4add984baf6c46f61c91a36333bc79csize 33572961234567891011121314151617181920{ "_class_name": "DDIMScheduler", "_diffusers_version": "0.35.2", "beta_end": 0.012, "beta_schedule": "scaled_linear", "beta_start": 0.00085, "clip_sample": false, "clip_sample_range": 1.0, "dynamic_thresholding_ratio": 0.995, "num_train_timesteps": 1000, "prediction_type": "v_prediction", "rescale_betas_zero_snr": false, "sample_max_value": 1.0, "set_alpha_to_one": false, "skip_prk_steps": true, "steps_offset": 1, "thresholding": false, "timestep_spacing": "leading", "trained_betas": null}123456789101112131415161718192021222324{ "architectures": [ "CLIPTextModel" ], "attention_dropout": 0.0, "bos_token_id": 0, "dropout": 0.0, "dtype": "float16", "eos_token_id": 2, "hidden_act": "gelu", "hidden_size": 1024, "initializer_factor": 1.0, "initializer_range": 0.02, "intermediate_size": 4096, "layer_norm_eps": 1e-05, "max_position_embeddings": 77, "model_type": "clip_text_model", "num_attention_heads": 16, "num_hidden_layers": 23, "pad_token_id": 1, "projection_dim": 512, "transformers_version": "4.57.1", "vocab_size": 49408}123version https://git-lfs.github.com/spec/v1oid sha256:bc1827c465450322616f06dea41596eac7d493f4e95904dcb51f0fc745c4e13fsize 680820392123456789101112131415161718192021222324252627282930{ "bos_token": { "content": "<|startoftext|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }, "eos_token": { "content": "<|endoftext|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }, "pad_token": { "content": "!", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "unk_token": { "content": "<|endoftext|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }}123456789101112131415161718192021222324252627282930313233343536373839{ "add_prefix_space": false, "added_tokens_decoder": { "0": { "content": "!", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "49406": { "content": "<|startoftext|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": true }, "49407": { "content": "<|endoftext|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": true } }, "bos_token": "<|startoftext|>", "clean_up_tokenization_spaces": false, "do_lower_case": true, "eos_token": "<|endoftext|>", "errors": "replace", "extra_special_tokens": {}, "model_max_length": 77, "pad_token": "!", "tokenizer_class": "CLIPTokenizer", "unk_token": "<|endoftext|>"}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273{ "_class_name": "UNet2DConditionModel", "_diffusers_version": "0.35.2", "_name_or_path": "/root/.cache/huggingface/hub/models--hoan17--stablediffusion2.1bk/snapshots/96e303d9eb94245c5e347a050a177373f09da8ed/unet", "act_fn": "silu", "addition_embed_type": null, "addition_embed_type_num_heads": 64, "addition_time_embed_dim": null, "attention_head_dim": [ 5, 10, 20, 20 ], "attention_type": "default", "block_out_channels": [ 320, 640, 1280, 1280 ], "center_input_sample": false, "class_embed_type": null, "class_embeddings_concat": false, "conv_in_kernel": 3, "conv_out_kernel": 3, "cross_attention_dim": 1024, "cross_attention_norm": null, "down_block_types": [ "CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "DownBlock2D" ], "downsample_padding": 1, "dropout": 0.0, "dual_cross_attention": false, "encoder_hid_dim": null, "encoder_hid_dim_type": null, "flip_sin_to_cos": true, "freq_shift": 0, "in_channels": 4, "layers_per_block": 2, "mid_block_only_cross_attention": null, "mid_block_scale_factor": 1, "mid_block_type": "UNetMidBlock2DCrossAttn", "norm_eps": 1e-05, "norm_num_groups": 32, "num_attention_heads": null, "num_class_embeds": null, "only_cross_attention": false, "out_channels": 4, "projection_class_embeddings_input_dim": null, "resnet_out_scale_factor": 1.0, "resnet_skip_time_act": false, "resnet_time_scale_shift": "default", "reverse_transformer_layers_per_block": null, "sample_size": 96, "time_cond_proj_dim": null, "time_embedding_act_fn": null, "time_embedding_dim": null, "time_embedding_type": "positional", "timestep_post_act": null, "transformer_layers_per_block": 1, "up_block_types": [ "UpBlock2D", "CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "CrossAttnUpBlock2D" ], "upcast_attention": true, "use_linear_projection": true}123version https://git-lfs.github.com/spec/v1oid sha256:97e7f69f48af591476acfaceca38b39fd45e29c9825cea8194d4b6f282486a2bsize 17352640881234567891011121314151617181920212223242526272829303132333435363738{ "_class_name": "AutoencoderKL", "_diffusers_version": "0.35.2", "_name_or_path": "/root/.cache/huggingface/hub/models--hoan17--stablediffusion2.1bk/snapshots/96e303d9eb94245c5e347a050a177373f09da8ed/vae", "act_fn": "silu", "block_out_channels": [ 128, 256, 512, 512 ], "down_block_types": [ "DownEncoderBlock2D", "DownEncoderBlock2D", "DownEncoderBlock2D", "DownEncoderBlock2D" ], "force_upcast": true, "in_channels": 3, "latent_channels": 4, "latents_mean": null, "latents_std": null, "layers_per_block": 2, "mid_block_add_attention": true, "norm_num_groups": 32, "out_channels": 3, "sample_size": 768, "scaling_factor": 0.18215, "shift_factor": null, "up_block_types": [ "UpDecoderBlock2D", "UpDecoderBlock2D", "UpDecoderBlock2D", "UpDecoderBlock2D" ], "use_post_quant_conv": true, "use_quant_conv": true}123version https://git-lfs.github.com/spec/v1oid sha256:3e4c08995484ee61270175e9e7a072b66a6e4eeb5f0c266667fe1f45b90daf9asize 167335342README.mdAdded+16
config.jsonAdded+61
feature_extractor/preprocessor_config.jsonAdded+27
model_index.jsonAdded+38
pytorch_lora_weights.safetensorsAdded+3
scheduler/scheduler_config.jsonAdded+20
text_encoder/config.jsonAdded+24
text_encoder/model.safetensorsAdded+3
tokenizer/merges.txtAdded
tokenizer/special_tokens_map.jsonAdded+30
tokenizer/tokenizer_config.jsonAdded+39
tokenizer/vocab.jsonAdded
unet/config.jsonAdded+73
unet/diffusion_pytorch_model.safetensorsAdded+3
vae/config.jsonAdded+38
vae/diffusion_pytorch_model.safetensorsAdded+3