Skip to content

Commit

Permalink
chore: switch to flux pro v1.1 for image generation
Browse files Browse the repository at this point in the history
  • Loading branch information
davidramiro committed Nov 26, 2024
1 parent ad2dddc commit 910fc13
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config.sample.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ You are HSBot, a helpful assistant.

[fal]
api_key = "4242:1234"
flux_url = "https://fal.run/fal-ai/flux-pro"
flux_url = "https://fal.run/fal-ai/flux-pro/v1.1"
whisper_url = "https://fal.run/fal-ai/whisper"
2 changes: 2 additions & 0 deletions internal/adapters/generator/fal.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func NewFALGenerator(apiURL, apiKey string) *FALGenerator {
type imageRequest struct {
Prompt string `json:"prompt"`
EnableSafetyChecker bool `json:"enable_safety_checker"`
SafetyTolerance string `json:"safety_tolerance"`
ImageSize string `json:"image_size"`
}

Expand All @@ -41,6 +42,7 @@ func (f *FALGenerator) GenerateFromPrompt(ctx context.Context, prompt string) (s
Prompt: prompt,
EnableSafetyChecker: false,
ImageSize: "square",
SafetyTolerance: "5",
}

payloadBuf := new(bytes.Buffer)
Expand Down

0 comments on commit 910fc13

Please sign in to comment.