Stable-Diffusion-Vertex/hpo/kohya-lora/vertex-ai-config-hpo.yaml (22 lines of code) (raw):

# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. studySpec: metrics: - metricId: avr_loss goal: MINIMIZE parameters: - parameterId: lr scaleType: UNIT_LOG_SCALE doubleValueSpec: minValue: 0.00001 maxValue: 0.0001 measurementSelectionType: BEST_MEASUREMENT trialJobSpec: workerPoolSpecs: - machineSpec: machineType: n1-standard-8 acceleratorType: NVIDIA_TESLA_V100 acceleratorCount: 1 replicaCount: 1 containerSpec: imageUri: us-central1-docker.pkg.dev/PROJECT_ID/ARTIFACT_REGISTRY_NAME/sd-training:kohya-hpo args: ["--method","kohya_lora","--model_name","CompVis/stable-diffusion-v1-4","--input_storage","/gcs/YOUR_BUCKET_NAME/IMAGE_FOLDER","--output_storage","/gcs/YOUR_BUCKET_NAME/OUTPUT_FOLDER","--display_name","PROMPT_NAME","--hpo","y"] command: ["python3","train_kohya.py"]