Model Overview
This model was trained using the training environment and computing resources provided by the Model Training section of the ModelScope AIGC platform
Model Type: LoRA
Base Model: openmoss/MOSS-Image-SFT
Training Framework: DiffSynth-Studio
Training Dataset Size: 100
Total Training Steps: 9,000
Open-Source License: Apache-2.0
Inference Code
Install DiffSynth-Studio
pip install diffsynthRun inference
from diffsynth.pipelines.moss_image import MOSSImagePipeline, ModelConfigimport torchpipe = MOSSImagePipeline.from_pretrained( torch_dtype=torch.bfloat16, device="cuda", model_configs=[ ModelConfig( model_id="openmoss/MOSS-Image-SFT", origin_file_pattern="transformer/diffusion_pytorch_model*.safetensors" ), ModelConfig( model_id="openmoss/MOSS-Image-SFT", origin_file_pattern="text_encoder/model*.safetensors" ), ModelConfig( model_id="openmoss/MOSS-Image-SFT", origin_file_pattern="vae/diffusion_pytorch_model.safetensors", computation_dtype=torch.float32 ), ], tokenizer_config=ModelConfig( model_id="openmoss/MOSS-Image-SFT", origin_file_pattern="tokenizer/" ),)pipe.load_lora( pipe.dit, ModelConfig( model_id="synthesia/Ryohka_Suzuya", origin_file_pattern="Ryohka_Suzuya_c1-st9000.safetensors" ))prompt = "a cat"image = pipe( prompt, height=1024, width=1024, seed=0, num_inference_steps=50, cfg_scale=3.0)image.save("image.jpg")