Nymbo commited on
Commit
f45bafe
Β·
verified Β·
1 Parent(s): bea19ad

updated to use FLUX-Krea and Qwen3-235B-A22B-Instruct-2507

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -9,15 +9,15 @@ from live_preview_helpers import flux_pipe_call_that_returns_an_iterable_of_imag
9
 
10
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
11
 
12
- pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16).to(device)
13
- good_vae = AutoencoderKL.from_pretrained("black-forest-labs/FLUX.1-dev", subfolder="vae", torch_dtype=torch.bfloat16).to(device)
14
  # pipe.enable_sequential_cpu_offload()
15
  # pipe.vae.enable_slicing()
16
  # pipe.vae.enable_tiling()
17
  # pipe.to(torch.float16)
18
  pipe.flux_pipe_call_that_returns_an_iterable_of_images = flux_pipe_call_that_returns_an_iterable_of_images.__get__(pipe)
19
 
20
- llm_client = Client("Qwen/Qwen2.5-72B-Instruct")
21
  # t2i_client = Client("black-forest-labs/FLUX.1-dev")
22
  # t2i_client = Client("black-forest-labs/FLUX.1-schnell")
23
 
@@ -83,7 +83,7 @@ def generate_character(world_description, persona_description, progress=gr.Progr
83
 
84
  app_description = """
85
  - This app generates a character in JSON format based on a persona description and a world description.
86
- - The character's appearance is generated using [FLUX-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev) and the character description is generated using [Qwen2.5-72B-Instruct](https://huggingface.co/Qwen/Qwen2.5-72B-Instruct).
87
  - The persona description is randomly selected from the [FinePersonas-Lite](https://huggingface.co/datasets/MohamedRashad/FinePersonas-Lite) dataset.
88
 
89
  **Note:** I recommend starting with the world description (you can write one or loop over randomly generated ones) and then try different persona descriptions to generate interesting characters for the world you created.
 
9
 
10
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
11
 
12
+ pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-Krea-dev", torch_dtype=torch.bfloat16).to(device)
13
+ good_vae = AutoencoderKL.from_pretrained("black-forest-labs/FLUX.1-Krea-dev", subfolder="vae", torch_dtype=torch.bfloat16).to(device)
14
  # pipe.enable_sequential_cpu_offload()
15
  # pipe.vae.enable_slicing()
16
  # pipe.vae.enable_tiling()
17
  # pipe.to(torch.float16)
18
  pipe.flux_pipe_call_that_returns_an_iterable_of_images = flux_pipe_call_that_returns_an_iterable_of_images.__get__(pipe)
19
 
20
+ llm_client = Client("Qwen/Qwen3-235B-A22B-Instruct-2507")
21
  # t2i_client = Client("black-forest-labs/FLUX.1-dev")
22
  # t2i_client = Client("black-forest-labs/FLUX.1-schnell")
23
 
 
83
 
84
  app_description = """
85
  - This app generates a character in JSON format based on a persona description and a world description.
86
+ - The character's appearance is generated using [FLUX.1-Krea-dev](black-forest-labs/FLUX.1-Krea-dev) and the character description is generated using [Qwen/Qwen3-235B-A22B-Instruct-2507](Qwen/Qwen3-235B-A22B-Instruct-2507).
87
  - The persona description is randomly selected from the [FinePersonas-Lite](https://huggingface.co/datasets/MohamedRashad/FinePersonas-Lite) dataset.
88
 
89
  **Note:** I recommend starting with the world description (you can write one or loop over randomly generated ones) and then try different persona descriptions to generate interesting characters for the world you created.