import os
import torch
from einops import rearrange
from transformers import pipeline
from flux.sampling import denoise, get_noise, get_schedule, unpack, prepare
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head><meta charset="utf-8" /></head> | |
<body> | |
<div> <script type="text/javascript">window.PlotlyConfig = {MathJaxConfig: 'local'};</script> | |
<script type="text/javascript">/** | |
* plotly.js v2.35.0 | |
* Copyright 2012-2024, Plotly, Inc. | |
* All rights reserved. | |
* Licensed under the MIT license |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fastapi | |
import time | |
from typing import Dict | |
from modal import asgi_app | |
from modal.functions import FunctionCall | |
IMAGE_MODEL_DIR = "/model" | |
web_app = fastapi.FastAPI() |