RealtimeImage2ImageSchema.fromJson constructor

RealtimeImage2ImageSchema.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory RealtimeImage2ImageSchema.fromJson(Map<String, dynamic> json) {
  return RealtimeImage2ImageSchema(
    key: json['key'],
    webhook: json['webhook'],
    trackId: json['track_id'],
    prompt: json['prompt'],
    initImage: json['init_image'],
    negativePrompt: json['negative_prompt'],
    strength: (json['strength'] as num?)?.toDouble(),
    base64: json['base64'],
    seed: json['seed'],
    guidanceScale: json['guidance_scale'],
    numInferenceSteps: json['num_inference_steps'],
    width: json['width'] ?? 512,
    height: json['height'] ?? 512,
    samples: json['samples'] ?? 1,
  );
}