We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I wanted to add weighted prompt on the photomaker pipe.
pipe = PhotoMakerStableDiffusionXLPipeline.from_single_file( "model.safetensors", torch_dtype=torch.bfloat16, use_safetensors=True, variant="fp16" ).to("cuda") ### Load PhotoMaker checkpoint pipe.load_photomaker_adapter( folder, subfolder="", weight_name= weightname, trigger_word="img" # define the trigger word ) pipe.scheduler = DDPMScheduler.from_config(pipe.scheduler.config) # Weighted prompt with compel from compel import Compel, ReturnedEmbeddingsType compel = Compel( tokenizer=[pipe.tokenizer, pipe.tokenizer_2] , text_encoder=[pipe.text_encoder, pipe.text_encoder_2], returned_embeddings_type=ReturnedEmbeddingsType.PENULTIMATE_HIDDEN_STATES_NON_NORMALIZED, requires_pooled=[False, True] ) id_img = Image.open(img.png") prompt = "blahbla" conditioning, pooled = compel(prompt) # generation generator = torch.Generator(device="cuda").manual_seed(4) images = pipe( #prompt=prompt, prompt_embeds=conditioning, pooled_prompt_embeds=pooled, input_id_images= [id_img], num_images_per_prompt=1, num_inference_steps=10, guidance_scale=4, start_merge_step=0, generator=generator, height= 1024, width= 1024, ).images[0] images.show()
Ang got : RuntimeError: CUDA error: device-side assert triggered
RuntimeError: CUDA error: device-side assert triggered
Is there any boilerplate code to implement weighted prompt ?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I wanted to add weighted prompt on the photomaker pipe.
Ang got :
RuntimeError: CUDA error: device-side assert triggered
Is there any boilerplate code to implement weighted prompt ?
The text was updated successfully, but these errors were encountered: