RealtimeText2ImageSchema.fromJson constructor
RealtimeText2ImageSchema.fromJson(
- Map<String, dynamic> json
)
Implementation
factory RealtimeText2ImageSchema.fromJson(Map<String, dynamic> json) {
return RealtimeText2ImageSchema(
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,
);
}