FLUX.1-schnell-onnx / README.md
hishamchow's picture
Update README.md
12edc2b verified
metadata
license: apache-2.0
base_model:
  - black-forest-labs/FLUX.1-schnell
pipeline_tag: text-to-image
library_name: diffusers
libraries: ONNX

black-forest-labs/FLUX.1-schnell-onnx

Original Model

https://huggingface.co/black-forest-labs/FLUX.1-schnell

Running

1. Using Amuse GUI Application

Use Amuse GUI application to run it: https://www.amuse-ai.com/

2. C# Inference Demo

https://github.com/TensorStack-AI/OnnxStack

// csharp example
// Create Pipeline
var pipeline = FluxPipeline.CreatePipeline("D:\\Models\\FLUX.1-schnell-onnx");
// Prompt
var promptOptions = new PromptOptions
{
    Prompt = "a majestic Royal Bengal Tiger on the mountain top overlooking beatiful Lake Tahoe snowy mountains and deep blue lake, deep blue sky, ultra hd, 8k, photorealistic"
};
// Scheduler Options
var schedulerOptions = pipeline.DefaultSchedulerOptions with
{  
    InferenceSteps = 4,
    GuidanceScale = 1.0f,
    SchedulerType = SchedulerType.FlowMatchEulerDiscrete,
};

// Run pipeline
var result = await pipeline.GenerateImageAsync(promptOptions, schedulerOptions);

// Save Image Result
await result.SaveAsync("Result.png");

Inference Result

image/png