Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent output between different flux model #369

Open
dulalbert opened this issue Oct 11, 2024 · 1 comment
Open

Inconsistent output between different flux model #369

dulalbert opened this issue Oct 11, 2024 · 1 comment

Comments

@dulalbert
Copy link

Using flux schnell and flux dev output the image in base64 while black-forest-labs/flux-1.1-pro outputs directly the link to the image on replicate server. Is it normal ?

Here is the used call for schnell:

output = replicate.run( "black-forest-labs/flux-schnell", input={ "prompt": "A cake", "go_fast": True, "aspect_ratio": "1:1", "output_quality": 80, "num_inference_steps": 4, "output_format": "jpg", },

@AusafG5
Copy link

AusafG5 commented Oct 14, 2024

Using flux schnell and flux dev output the image in base64 while black-forest-labs/flux-1.1-pro outputs directly the link to the image on replicate server. Is it normal ?

Here is the used call for schnell:

output = replicate.run( "black-forest-labs/flux-schnell", input={ "prompt": "A cake", "go_fast": True, "aspect_ratio": "1:1", "output_quality": 80, "num_inference_steps": 4, "output_format": "jpg", },

same with schnell, wasn't this working before though ? it started blowing up all of a sudden or i'm having some sort of false memory ?

damn, its not consistent even for base64
this is what i am doing rn:

def base64toimage(data):
    if isinstance(data, replicate.helpers.FileOutput):
        data = data.read()
    elif isinstance(data, bytes):
        pass  # bytes already
    else:
        if data.startswith('data:image') or data.startswith('data:application'):
            data = data.split('base64,')[1]
        data = base64.b64decode(data)
    
    return Image.open(io.BytesIO(data))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants