Skip to content

Added Kvikontent's Midjourney V6 Stable Diffusion LoRA Model#169

Closed
benliang99 wants to merge 1 commit intotestnetfrom
lora_models
Closed

Added Kvikontent's Midjourney V6 Stable Diffusion LoRA Model#169
benliang99 wants to merge 1 commit intotestnetfrom
lora_models

Conversation

@benliang99
Copy link
Contributor

This update integrates Kvikontent's Midjourney V6 Stable Diffusion LoRA model into the BitMind Subnet's collection of synthetic image generators.

Model Configuration

The following configuration has been added to config.py to support the new model:

"runwayml/stable-diffusion-v1-5-midjourney-v6": {
"pipeline_cls": StableDiffusionPipeline,
"from_pretrained_args": {
"model_id": "runwayml/stable-diffusion-v1-5",
"use_safetensors": True,
"torch_dtype": torch.float16,
},
"lora_model_id": "Kvikontent/midjourney-v6",
"lora_loading_args": {
"use_peft_backend": True
},
"enable_model_cpu_offload": False
},

LoRA Model Weight Loading

Support for loading LoRA model weights using the Parameter-Efficient Fine-Tuning (PEFT) library has also been added to the synthetic data generator:

# Load LoRA weights if specified
if 'lora_model_id' in model_config:
bt.logging.info(f"Loading LoRA weights from {model_config['lora_model_id']}")
lora_loading_args = model_config.get('lora_loading_args', {})
self.model.load_lora_weights(
model_config['lora_model_id'],
**lora_loading_args
)

@benliang99
Copy link
Contributor Author

Consolidated in #171

@benliang99 benliang99 closed this Mar 26, 2025
@dylanuys dylanuys deleted the lora_models branch May 15, 2025 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant