FastTextToImageRequest

Struct FastTextToImageRequest 

Source
pub struct FastTextToImageRequest {
    pub aspect_ratio: Option<String>,
    pub guidance: Option<Vec<Option<GuidanceInput>>>,
    pub guidance_scale: Option<f64>,
    pub medium: Option<String>,
    pub negative_prompt: Option<String>,
    pub num_images: Option<i64>,
    pub num_inference_steps: Option<i64>,
    pub prompt: String,
    pub prompt_enhancement: Option<bool>,
    pub seed: Option<i64>,
    pub sync_mode: Option<bool>,
}
Available on (crate features endpoints or endpoints_fal-ai or endpoints_fal-ai_sync-lipsync or endpoints_fal-ai_veo2 or endpoints_fal-ai_minimax-music or endpoints_fal-ai_diffrhythm or endpoints_fal-ai_yue or endpoints_fal-ai_flux-pro or endpoints_fal-ai_ideogram or endpoints_fal-ai_hunyuan-video-lora-training or endpoints_fal-ai_flux-lora-fast-training or endpoints_fal-ai_flux-lora-portrait-trainer or endpoints_fal-ai_flux-pro-trainer or endpoints_fal-ai_recraft-v3 or endpoints_fal-ai_minimax or endpoints_fal-ai_minimax-image or endpoints_fal-ai_hyper3d or endpoints_fal-ai_aura-flow or endpoints_fal-ai_flux or endpoints_fal-ai_flux-lora or endpoints_fal-ai_flux-subject or endpoints_fal-ai_flux-lora-canny or endpoints_fal-ai_flux-lora-depth or endpoints_fal-ai_sana or endpoints_fal-ai_omnigen-v1 or endpoints_fal-ai_lumina-image or endpoints_fal-ai_stable-diffusion-v35-large or endpoints_fal-ai_stable-diffusion-v35-medium or endpoints_fal-ai_switti or endpoints_fal-ai_recraft-20b or endpoints_fal-ai_bria or endpoints_fal-ai_flux-lora-fill or endpoints_fal-ai_flux-control-lora-canny or endpoints_fal-ai_flux-control-lora-depth or endpoints_fal-ai_flux-general or endpoints_fal-ai_flux-pulid or endpoints_fal-ai_iclight-v2 or endpoints_fal-ai_flux-differential-diffusion or endpoints_fal-ai_stable-diffusion-v3-medium or endpoints_fal-ai_fast-sdxl or endpoints_fal-ai_lora or endpoints_fal-ai_aura-sr or endpoints_fal-ai_codeformer or endpoints_fal-ai_thera or endpoints_fal-ai_ddcolor or endpoints_fal-ai_swin2sr or endpoints_fal-ai_mix-dehaze-net or endpoints_fal-ai_docres or endpoints_fal-ai_nafnet or endpoints_fal-ai_drct-super-resolution or endpoints_fal-ai_ben or endpoints_fal-ai_flowedit or endpoints_fal-ai_zonos or endpoints_fal-ai_stable-cascade or endpoints_fal-ai_mochi-v1 or endpoints_fal-ai_stepfun-video or endpoints_fal-ai_hunyuan-video or endpoints_fal-ai_hunyuan-video-image-to-video or endpoints_fal-ai_hunyuan-video-img2vid-lora or endpoints_fal-ai_hunyuan-video-lora or endpoints_fal-ai_wan or endpoints_fal-ai_wan-t2v or endpoints_fal-ai_wan-i2v or endpoints_fal-ai_wan-i2v-lora or endpoints_fal-ai_wan-trainer or endpoints_fal-ai_wan-pro or endpoints_fal-ai_wan-effects or endpoints_fal-ai_skyreels-i2v or endpoints_fal-ai_vidu or endpoints_fal-ai_video-upscaler or endpoints_fal-ai_auto-caption or endpoints_fal-ai_mmaudio-v2 or endpoints_fal-ai_luma-dream-machine or endpoints_fal-ai_luma-photon or endpoints_fal-ai_kling or endpoints_fal-ai_kling-video or endpoints_fal-ai_pixverse or endpoints_fal-ai_transpixar or endpoints_fal-ai_cogvideox-5b or endpoints_fal-ai_cogview4 or endpoints_fal-ai_ltx-video or endpoints_fal-ai_ltx-video-v095 or endpoints_fal-ai_stable-video or endpoints_fal-ai_fast-svd or endpoints_fal-ai_fast-svd-lcm or endpoints_fal-ai_birefnet or endpoints_fal-ai_got-ocr or endpoints_fal-ai_creative-upscaler or endpoints_fal-ai_ffmpeg-api or endpoints_fal-ai_clarity-upscaler or endpoints_fal-ai_ccsr or endpoints_fal-ai_fast-turbo-diffusion or endpoints_fal-ai_fast-lcm-diffusion or endpoints_fal-ai_whisper or endpoints_fal-ai_wizper or endpoints_fal-ai_fast-lightning-sdxl or endpoints_fal-ai_hyper-sdxl or endpoints_fal-ai_playground-v25 or endpoints_fal-ai_amt-interpolation or endpoints_fal-ai_t2v-turbo or endpoints_fal-ai_sd15-depth-controlnet or endpoints_fal-ai_photomaker or endpoints_fal-ai_lcm or endpoints_fal-ai_lcm-sd15-i2i or endpoints_fal-ai_fooocus or endpoints_fal-ai_animatediff-v2v or endpoints_fal-ai_fast-animatediff or endpoints_fal-ai_illusion-diffusion or endpoints_fal-ai_imageutils or endpoints_fal-ai_esrgan or endpoints_fal-ai_fast-sdxl-controlnet-canny or endpoints_fal-ai_inpaint or endpoints_fal-ai_animatediff-sparsectrl-lcm or endpoints_fal-ai_pulid or endpoints_fal-ai_ip-adapter-face-id or endpoints_fal-ai_stable-audio or endpoints_fal-ai_diffusion-edge or endpoints_fal-ai_triposr or endpoints_fal-ai_retoucher or endpoints_fal-ai_any-llm or endpoints_fal-ai_llavav15-13b or endpoints_fal-ai_llava-next or endpoints_fal-ai_fast-fooocus-sdxl or endpoints_fal-ai_face-to-sticker or endpoints_fal-ai_moondream or endpoints_fal-ai_sadtalker or endpoints_fal-ai_musetalk or endpoints_fal-ai_dubbing or endpoints_fal-ai_layer-diffusion or endpoints_fal-ai_stable-diffusion-v15 or endpoints_fal-ai_pixart-sigma or endpoints_fal-ai_dreamshaper or endpoints_fal-ai_realistic-vision or endpoints_fal-ai_lightning-models or endpoints_fal-ai_omni-zero or endpoints_fal-ai_leffa or endpoints_fal-ai_cat-vton or endpoints_fal-ai_dwpose or endpoints_fal-ai_florence-2-large or endpoints_fal-ai_era-3d or endpoints_fal-ai_live-portrait or endpoints_fal-ai_kolors or endpoints_fal-ai_sdxl-controlnet-union or endpoints_fal-ai_sam2 or endpoints_fal-ai_evf-sam or endpoints_fal-ai_sa2va or endpoints_fal-ai_mini-cpm or endpoints_fal-ai_controlnext or endpoints_fal-ai_workflowutils or endpoints_fal-ai_image-preprocessors or endpoints_fal-ai_f5-tts or endpoints_fal-ai_kokoro or endpoints_fal-ai_trellis or endpoints_fal-ai_hunyuan3d or endpoints_fal-ai_playai or endpoints_fal-ai_latentsync or endpoints_fal-ai_moondream-next or endpoints_fal-ai_recraft-clarity-upscale or endpoints_fal-ai_recraft-creative-upscale or endpoints_fal-ai_elevenlabs or endpoints_fal-ai_janus or endpoints_fal-ai_imagen3 or endpoints_fal-ai_gemini-flash-edit or endpoints_fal-ai_post-processing or endpoints_fal-ai_video-prompt-generator or endpoints_fal-ai_eye-correct or endpoints_fal-ai_topaz or endpoints_fal-ai_csm-1b or endpoints_fal-ai_pika or endpoints_fal-ai_invisible-watermark) and (crate features endpoints or endpoints_fal-ai or endpoints_fal-ai_bria) only.

Fields§

§aspect_ratio: Option<String>

The aspect ratio of the image. When a guidance method is being used, the aspect ratio is defined by the guidance image and this parameter is ignored.

§guidance: Option<Vec<Option<GuidanceInput>>>

Guidance images to use for the generation. Up to 4 guidance methods can be combined during a single inference.

§guidance_scale: Option<f64>

The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you.

§medium: Option<String>

Which medium should be included in your generated images. This parameter is optional.

§negative_prompt: Option<String>

The negative prompt you would like to use to generate images.

§num_images: Option<i64>

How many images you would like to generate. When using any Guidance Method, Value is set to 1.

§num_inference_steps: Option<i64>

The number of iterations the model goes through to refine the generated image. This parameter is optional.

§prompt: String

The prompt you would like to use to generate images. “A lone figure stands on the edge of a serene cliff at sunset, gazing out over a vast, mystical valley. The figure is clad in flowing robes that ripple in the gentle breeze, silhouetted against the golden and lavender hues of the sky. Below, a cascading waterfall pours into a sparkling river winding through a forest of bioluminescent trees. The scene blends the awe of nature with a touch of otherworldly wonder, inviting reflection and imagination.”

§prompt_enhancement: Option<bool>

When set to true, enhances the provided prompt by generating additional, more descriptive variations, resulting in more diverse and creative output images.

§seed: Option<i64>

The same seed and the same prompt given to the same version of the model will output the same image every time.

§sync_mode: Option<bool>

If set to true, the function will wait for the image to be generated and uploaded before returning the response. This will increase the latency of the function but it allows you to get the image directly in the response without going through the CDN.

Trait Implementations§

Source§

impl Debug for FastTextToImageRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FastTextToImageRequest

Source§

fn default() -> FastTextToImageRequest

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for FastTextToImageRequest

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for FastTextToImageRequest

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,